summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp.el
diff options
context:
space:
mode:
authorOleh Krehel <ohwoeowho@gmail.com>2015-05-19 09:49:12 +0200
committerOleh Krehel <ohwoeowho@gmail.com>2015-05-20 15:20:37 +0200
commit5d752c8a1c28e003ded0f2daa0d93eb12a31195a (patch)
tree51afc7bcc5a4374141c52f1390f04c199091f3a0 /lisp/emacs-lisp/lisp.el
parent1972e49f924dc8706aef512a0d69fd7c29a4f1f6 (diff)
downloademacs-5d752c8a1c28e003ded0f2daa0d93eb12a31195a.tar.gz
emacs-5d752c8a1c28e003ded0f2daa0d93eb12a31195a.tar.bz2
emacs-5d752c8a1c28e003ded0f2daa0d93eb12a31195a.zip
Add let-when-compile macro instead of using pcase-let
* lisp/subr.el (let-when-compile): New let-like macro that makes its bindings known to macros like `eval-when-compile' in the body. * lisp/emacs-lisp/lisp-mode.el: Change the top-level `pcase-let' to a `let-when-compile'. Also comment out the unused lexical var `el-kws-re'. The change greatly improves readability, while providing almost the same (even shorter) byte code: instead of pre-evaluating 10 variables, tossing them into a list, and destructuring that list a full screen page later, the variables are simply bound as they are evaluated, wrapped individually in `eval-when-compile'.
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
0 files changed, 0 insertions, 0 deletions