branch: externals/dash commit 93e0465e0ea1d3fbcb49e84f0663c9be6a988225 Author: citreu <all_but_l...@163.com> Commit: citreu <all_but_l...@163.com>
Remove dependecy `macroexp` We need to support lower version since `macroexp-let2` was introduced at Emacs 24.3 --- dash.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dash.el b/dash.el index 411e052..e945fbb 100644 --- a/dash.el +++ b/dash.el @@ -1828,12 +1828,12 @@ kv can be any key-value store, such as plist, alist or hash-table." "Generate extracting KEY from SOURCE for &alist destructuring." `(cdr (assoc ,key ,source))) -(require 'macroexp) - (defun dash-expand:&hash? (key source) "Generate extracting KEY from SOURCE for &hash? destructuring. Similar to &hash but check whether the map is not nil." - (macroexp-let2 nil source source `(when ,source (gethash ,key ,source)))) + (let ((src (make-symbol "src"))) + `(let ((,src ,source)) + (when ,src (gethash ,key ,src))))) (defalias 'dash-expand:&keys 'dash-expand:&plist)