We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65c86ea commit 5ebc252Copy full SHA for 5ebc252
lisp/doom-lib.el
@@ -317,15 +317,15 @@ ARGLIST."
317
(allow-other-keys arglist))
318
,@body)))
319
320
-(put 'fn! 'lookup-table
321
- '((%2 . 2) (%3 . 3) (%4 . 4) (%5 . 5)
322
- (%6 . 6) (%7 . 7) (%8 . 8) (%9 . 9)))
+(let ((i 1))
+ (dolist (sym '(%2 %3 %4 %5 %6 %7 %8 %9))
+ (put 'fn! sym (cl-incf i))))
323
(defun doom--fn-crawl (data args)
324
(cond ((symbolp data)
325
(when-let
326
(pos (cond ((eq data '%*) 0)
327
((memq data '(% %1)) 1)
328
- ((cdr (assq data (get 'fn! 'lookup-table))))))
+ ((get 'fn! data))))
329
(when (and (= pos 1)
330
(aref args 1)
331
(not (eq data (aref args 1))))
0 commit comments