aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2020-09-01 23:22:09 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2020-09-01 23:22:09 +0100
commit5e25230dc9d861a23cfcef7c053e3d7c8f048300 (patch)
tree4e2bad1b8771ec9723f2ea1ada4d51dafd27011b /Emacs/.config/emacs
parentb7494339f518daad8029c6dcff13b4a7f52629e5 (diff)
downloaddotfiles-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.org11
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