add xe-tools emacs module

Signed-off-by: Xe <me@christine.website>
This commit is contained in:
Cadey Ratio 2023-01-23 11:30:18 -05:00
parent 5c06ae218a
commit 0c8ff8494e
2 changed files with 17 additions and 0 deletions

View File

@ -468,6 +468,15 @@ in {
enable = true;
mode = [ ''"\\.zig\\'"'' ];
};
## custom shit
xe-tools = {
enable = true;
package = (epkgs: epkgs.trivialBuild {
pname = "xe-tools";
src = ./xe-tools.el;
});
};
};
};
};

View File

@ -0,0 +1,8 @@
(defun xe/count-buffers (&optional display-anyway)
"Display or return the number of buffers."
(interactive)
(let ((buf-count (length (buffer-list))))
(if (or (interactive-p) display-anyway)
(message "%d buffers in this Emacs" buf-count)) buf-count))
(provide 'xe-tools)