Avoid using dash.el functions in macro bodies

* dash-functional.el (-cut): Prepare for this macro's inclusion in
dash.el by replacing any uses of dash.el functions that are not
defined at byte-compile-time with corresponding macros (#356).
master
Basil L. Contovounesios 5 years ago
parent af21da3200
commit 51d81a5c4a
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 6
      dash-functional.el

@ -87,8 +87,10 @@ Arguments denoted by <> will be left unspecialized.
See SRFI-26 for detailed description."
(let* ((i 0)
(args (mapcar (lambda (_) (setq i (1+ i)) (make-symbol (format "D%d" i)))
(-filter (-partial 'eq '<>) params))))
(args (--keep (when (eq it '<>)
(setq i (1+ i))
(make-symbol (format "D%d" i)))
params)))
`(lambda ,args
,(let ((body (--map (if (eq it '<>) (pop args) it) params)))
(if (eq (car params) '<>)

Loading…
Cancel
Save