[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bind-key 221d0b2164 2/4: Revert "Add: 'local' keyword"
From: |
ELPA Syncer |
Subject: |
[elpa] externals/bind-key 221d0b2164 2/4: Revert "Add: 'local' keyword" |
Date: |
Sun, 27 Nov 2022 17:57:19 -0500 (EST) |
branch: externals/bind-key
commit 221d0b2164385f0e20813abbe007c06ce21342e3
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Revert "Add: 'local' keyword"
This reverts commit 2808c8466fcce62cc96ae159d96d8205e78c4053.
---
use-package-core.el | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/use-package-core.el b/use-package-core.el
index 1190f14489..6606681f2e 100644
--- a/use-package-core.el
+++ b/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