diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2020-09-01 23:22:09 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2020-09-01 23:22:09 +0100 |
commit | 5e25230dc9d861a23cfcef7c053e3d7c8f048300 (patch) | |
tree | 4e2bad1b8771ec9723f2ea1ada4d51dafd27011b /Emacs/.config/emacs | |
parent | b7494339f518daad8029c6dcff13b4a7f52629e5 (diff) | |
download | dotfiles-5e25230dc9d861a23cfcef7c053e3d7c8f048300.tar.gz dotfiles-5e25230dc9d861a23cfcef7c053e3d7c8f048300.tar.bz2 dotfiles-5e25230dc9d861a23cfcef7c053e3d7c8f048300.zip |
+macro to create a non-argument lambda: a procedure
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 9972d59..71946a0 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -216,6 +216,17 @@ Basic, tail recursive algorithm for calculating powers init (pow a (- n 1) (* a init))))) #+end_src +** Define procedure +=lambda= provides a function with possible arguments. A procedure is +something I define as essentially a function without arguments. This +macro returns an anonymous function with no arguments with all the +forms provided. It returns it in 'backquoted' form as that is the most +common use of this macro. +#+begin_src emacs-lisp +(defmacro proc (&rest CDR) + "For a given list of forms CDR, return a quoted non-argument lambda." + `(quote (lambda () ,@CDR))) +#+end_src * Core packages ** General Setup general, a good package for defining keys. In this case, I |