refactor!(lib): rename fn!->lambda! & fn!!->fn!
BREAKING CHANGE: This renames the fn! macro to lambda! and fn!! to fn!. I hadn't put much thought into their names when they were added, but now that they're seeing more use, I've reconsidered. The reasoning is (and I'll refer to them by their new names): - If you're using fn!, you care more about the syntax's brevity, than if you were using lambda!, so I wanted fn! to have the (even if slightly) shorter name. - lambda! decorates native lambda (with cl-function). Its old name did not suggest that connection like other !-macros in Doom's library do. - Their old names implied the two macros were somehow related or that one decorated the other. They aren't and don't.
This commit is contained in:
parent
ca73a689ab
commit
23feb482e9
6 changed files with 30 additions and 30 deletions
|
@ -230,7 +230,7 @@ prepended, and the keyword is in front."
|
|||
command (or (cl-position :root command :from-end t)
|
||||
0))))
|
||||
(when (or command prefix)
|
||||
(cl-loop with map = (fn!! (if (or (stringp %) (keywordp %)) % (prin1-to-string %)))
|
||||
(cl-loop with map = (fn! (if (or (stringp %) (keywordp %)) % (prin1-to-string %)))
|
||||
for c in (delq nil (cons type (seq-remove #'keywordp command)))
|
||||
if (listp c)
|
||||
collect (mapcar map c)
|
||||
|
@ -420,7 +420,7 @@ TARGET can be a `doom-cli', `doom-cli-context', or a command list."
|
|||
If RECURSIVE, includes breadcrumbs leading up to COMMANDSPEC."
|
||||
(funcall (if recursive?
|
||||
#'identity
|
||||
(fn!! (cl-loop with cmdlen = (length (car %))
|
||||
(fn! (cl-loop with cmdlen = (length (car %))
|
||||
for command in %
|
||||
while (= (length command) cmdlen)
|
||||
collect command)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue