mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
Removes plist-get-sexp
This function was not working as advertised. Then `funcall` was evaluated too early and all the benefits of late evaluation for autoloads was lost. Furthermore, this function was not really needed in the first place: ``` (use-package foo :config my-foo-function) ``` can easily be replaced by the following: ``` (use-package foo :config (my-foo-function)) ```
This commit is contained in:
parent
ff03bef1d1
commit
818c78f466
1 changed files with 4 additions and 10 deletions
|
@ -438,12 +438,6 @@ Return the list of recognized keywords."
|
||||||
(error "Unrecognized keyword: %s" keyword))))
|
(error "Unrecognized keyword: %s" keyword))))
|
||||||
(plist-keys args)))
|
(plist-keys args)))
|
||||||
|
|
||||||
(defun plist-get-sexp (plist prop)
|
|
||||||
(let ((sexp-or-function (plist-get plist prop)))
|
|
||||||
(if (functionp sexp-or-function)
|
|
||||||
(funcall sexp-or-function)
|
|
||||||
sexp-or-function)))
|
|
||||||
|
|
||||||
(defun plist-get-value (plist prop)
|
(defun plist-get-value (plist prop)
|
||||||
(let ((value-or-symbol (plist-get plist prop)))
|
(let ((value-or-symbol (plist-get plist prop)))
|
||||||
(if (symbolp value-or-symbol)
|
(if (symbolp value-or-symbol)
|
||||||
|
@ -476,12 +470,12 @@ For full documentation. please see commentary.
|
||||||
:ensure loads package using package.el if necessary."
|
:ensure loads package using package.el if necessary."
|
||||||
(use-package-validate-keywords args) ; error if any bad keyword, ignore result
|
(use-package-validate-keywords args) ; error if any bad keyword, ignore result
|
||||||
(let* ((commands (plist-get args :commands))
|
(let* ((commands (plist-get args :commands))
|
||||||
(pre-init-body (plist-get-sexp args :pre-init))
|
(pre-init-body (plist-get args :pre-init))
|
||||||
(init-body (plist-get-sexp args :init))
|
(init-body (plist-get args :init))
|
||||||
(config-body (plist-get-sexp args :config))
|
(config-body (plist-get args :config))
|
||||||
(diminish-var (plist-get args :diminish))
|
(diminish-var (plist-get args :diminish))
|
||||||
(defines (plist-get args :defines))
|
(defines (plist-get args :defines))
|
||||||
(idle-body (plist-get-sexp args :idle))
|
(idle-body (plist-get args :idle))
|
||||||
(keybindings-alist (plist-get-value args :bind))
|
(keybindings-alist (plist-get-value args :bind))
|
||||||
(mode-alist (plist-get-value args :mode))
|
(mode-alist (plist-get-value args :mode))
|
||||||
(interpreter-alist (plist-get-value args :interpreter))
|
(interpreter-alist (plist-get-value args :interpreter))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue