diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-07-13 16:07:14 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-07-13 16:07:14 +0100 |
commit | 961846882829919367b9d9f28be8e99445b058f3 (patch) | |
tree | 0912e96b0a0c4bc2e710175d1b1244b56252259e /Emacs | |
parent | 0d0f292d28b68c9e806d7f2f25c7e1f203a4ac2b (diff) | |
download | dotfiles-961846882829919367b9d9f28be8e99445b058f3.tar.gz dotfiles-961846882829919367b9d9f28be8e99445b058f3.tar.bz2 dotfiles-961846882829919367b9d9f28be8e99445b058f3.zip |
(Emacs)~clean up some custom functions
Diffstat (limited to 'Emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index b7b956e..47f5a12 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -71,9 +71,13 @@ any buffer of choice, as long as I can generate it via a command. buf-create &optional accept-numeric) "Generate a function named FUNC-NAME that toggles the buffer with -name BUF-NAME, using BUF-CREATE to generate it if necessary. +name BUF-NAME, using BUF-CREATE to generate it if buffer BUF-NAME +does not exist already. -BUF-NAME cannot be a regexp, it must be a fixed name." +BUF-NAME cannot be a regexp, it must be a fixed name. + +ACCEPT-NUMERIC modifies the function to allow numeric arguments +via C-u. Mostly used in Eshell." (let ((interactive-arg (if accept-numeric '(interactive "p") '(interactive))) (arguments @@ -121,10 +125,10 @@ common use of this macro. (You may notice ~proc~ is used where the return value doesn't matter). #+begin_src emacs-lisp -(defmacro proc (&rest CDR) - "For a given list of forms CDR, return a quoted non-argument +(defmacro proc (&rest BODY) + "For a given list of forms BODY, return a quoted 0 argument lambda." - `(quote (lambda () ,@CDR))) + `(quote (lambda nil ,@BODY))) #+end_src ** System specificity A macro that acts as a switch case on ~(system-name)~ which allows the |