summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2022-11-27 14:17:52 -0800
committerGitHub <noreply@github.com>2022-11-27 14:17:52 -0800
commitc74b5c16f8bc699e1f6da1ae33251b0cb63d40f2 (patch)
treec470e6de310e7d472251cd3af0dd72971c6d3972
parenta6cbfdd8f154e2cc61da673f8e6d2ccda1fe7d7c (diff)
parentebbd98edb3f2b38da4d55a62a09704f8d1a12c5a (diff)
downloademacs-c74b5c16f8bc699e1f6da1ae33251b0cb63d40f2.tar.gz
Merge pull request from skangas/revert-for-copyright2
GitHub-reference: https://github.com/jwiegley/use-package/issues/1027
-rw-r--r--lisp/use-package/use-package-core.el28
1 files changed, 1 insertions, 27 deletions
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el
index 1190f144893..6606681f2ea 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -100,8 +100,7 @@
:load
;; This must occur almost last; the only forms which should appear after
;; are those that must happen directly after the config forms.
- :config
- :local)
+ :config)
"The set of valid keywords, in the order they are processed in.
The order of this list is *very important*, so it is only
advisable to insert new keywords, never to delete or reorder
@@ -1580,31 +1579,6 @@ no keyword implies `:all'."
(when use-package-compute-statistics
`((use-package-statistics-gather :config ',name t))))))
-;;;; :local
-
-(defun use-package-normalize/:local (name keyword args)
- (let ((first-arg-name (symbol-name (caar args))))
- (if (not (string-suffix-p "-hook" first-arg-name))
- (let* ((sym-name (symbol-name name))
- (addition (if (string-suffix-p "-mode" sym-name)
- "-hook"
- "-mode-hook"))
- (hook (intern (concat sym-name addition))))
- `((,hook . ,(use-package-normalize-forms name keyword args))))
- (cl-loop for (hook . code) in args
- collect `(,hook . ,(use-package-normalize-forms name keyword code))))))
-
-(defun use-package-handler/:local (name _keyword arg rest state)
- (let* ((body (use-package-process-keywords name rest state)))
- (use-package-concat
- body
- (cl-loop for (hook . code) in arg
- for func-name = (intern (concat "use-package-func/" (symbol-name hook)))
- collect (progn
- (push 'progn code)
- `(defun ,func-name () ,code))
- collect `(add-hook ',hook ',func-name)))))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; The main macro