mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
use--package: eval-after-load name
instead of name-string. This prevents triggering by config file names
that have the same name as the package.
Reprise of c6d79d2cb4
This commit is contained in:
parent
81f5e48d32
commit
1f20acfd57
1 changed files with 3 additions and 3 deletions
|
@ -336,7 +336,7 @@ the user specified.")
|
||||||
(ignore
|
(ignore
|
||||||
(display-warning 'use-package (format ,fmt ,err) :error)))))))
|
(display-warning 'use-package (format ,fmt ,err) :error)))))))
|
||||||
|
|
||||||
(defun use--package (name-symbol name-string args)
|
(defun use--package (name name-symbol name-string args)
|
||||||
"See docstring for `use-package'."
|
"See docstring for `use-package'."
|
||||||
(let*
|
(let*
|
||||||
((commands (plist-get args :commands))
|
((commands (plist-get args :commands))
|
||||||
|
@ -431,7 +431,7 @@ the user specified.")
|
||||||
,(format "Configuring package %s"
|
,(format "Configuring package %s"
|
||||||
name-string)
|
name-string)
|
||||||
,@config-body)))
|
,@config-body)))
|
||||||
(list `(eval-after-load ,name-string
|
(list `(eval-after-load ',name
|
||||||
',body)))))
|
',body)))))
|
||||||
`((use-package-with-elapsed-timer
|
`((use-package-with-elapsed-timer
|
||||||
,(format "Loading package %s" name-string)
|
,(format "Loading package %s" name-string)
|
||||||
|
@ -522,7 +522,7 @@ this file. Usage:
|
||||||
;; At this point, we can expand the macro using the helper function.
|
;; At this point, we can expand the macro using the helper function.
|
||||||
;; `use--package'.
|
;; `use--package'.
|
||||||
(let*
|
(let*
|
||||||
((body (use--package name-symbol name-string args*))
|
((body (use--package name name-symbol name-symbol args*))
|
||||||
(pred (plist-get args* :if))
|
(pred (plist-get args* :if))
|
||||||
(expansion (if pred
|
(expansion (if pred
|
||||||
`(when ,pred ,@body)
|
`(when ,pred ,@body)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue