Open Ergus opened 3 years ago
This eval is not permitted in use-package, but leaf can.
(defconst myregex "BLA")
;;=> myregex
(setq leaf-expand-minimally t)
;;=> t
(macroexpand
'(leaf mymode
:mode `(,myregex . mymode)))
;;=> (prog1 'mymode
;; (unless (fboundp 'mymode) (autoload #'mymode "mymode" nil t))
;; (add-to-list 'auto-mode-alist '("BLA" . mymode)))
Hi:
I want to use something like:
But I don't find any documentation about how to do that because (as expected)
:mode (const myregex ...)
does not expands... Any suggestion? Is something like that possible?I know that I can use the
But the implied mode does not defines
mymode
as an autoload, so I will need an extra explicit autoload call.. something use-package does for the user (and simplifies the init code)