diff options
| author | John Wiegley | 2022-11-14 12:07:06 -0800 |
|---|---|---|
| committer | GitHub | 2022-11-14 12:07:06 -0800 |
| commit | 5dad5ff0febaa18b1cf7bfcb339170f92787552d (patch) | |
| tree | 4e9c67517c520f36dcccdf46e0b152f048c70d11 | |
| parent | 971634e3f9e5c539f8a0184ca4ec1c4a3f9495ec (diff) | |
| parent | 43254ae62f1a775edab9a3c74d0411ba0577de0e (diff) | |
| download | emacs-5dad5ff0febaa18b1cf7bfcb339170f92787552d.tar.gz emacs-5dad5ff0febaa18b1cf7bfcb339170f92787552d.zip | |
Merge pull request from skangas/ci
GitHub-reference: https://github.com/jwiegley/use-package/issues/1013
| -rw-r--r-- | lisp/use-package/bind-key.el | 12 | ||||
| -rw-r--r-- | lisp/use-package/use-package-core.el | 17 |
2 files changed, 18 insertions, 11 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el index cca5ad86187..567ef9e4e85 100644 --- a/lisp/use-package/bind-key.el +++ b/lisp/use-package/bind-key.el | |||
| @@ -223,11 +223,11 @@ See `bind-key' for more details." | |||
| 223 | In contrast to `define-key', this function removes the binding from the keymap." | 223 | In contrast to `define-key', this function removes the binding from the keymap." |
| 224 | (define-key keymap key nil) | 224 | (define-key keymap key nil) |
| 225 | ;; Split M-key in ESC key | 225 | ;; Split M-key in ESC key |
| 226 | (setq key (mapcan (lambda (k) | 226 | (setq key (cl-mapcan (lambda (k) |
| 227 | (if (and (integerp k) (/= (logand k ?\M-\0) 0)) | 227 | (if (and (integerp k) (/= (logand k ?\M-\0) 0)) |
| 228 | (list ?\e (logxor k ?\M-\0)) | 228 | (list ?\e (logxor k ?\M-\0)) |
| 229 | (list k))) | 229 | (list k))) |
| 230 | key)) | 230 | key)) |
| 231 | ;; Delete single keys directly | 231 | ;; Delete single keys directly |
| 232 | (if (= (length key) 1) | 232 | (if (= (length key) 1) |
| 233 | (delete key keymap) | 233 | (delete key keymap) |
| @@ -241,7 +241,7 @@ In contrast to `define-key', this function removes the binding from the keymap." | |||
| 241 | (delete (last key) submap) | 241 | (delete (last key) submap) |
| 242 | ;; Delete submap if it is empty | 242 | ;; Delete submap if it is empty |
| 243 | (when (= 1 (length submap)) | 243 | (when (= 1 (length submap)) |
| 244 | (bind-key--remove prefix keymap))))) | 244 | (bind-key--remove prefix keymap))))) |
| 245 | 245 | ||
| 246 | ;;;###autoload | 246 | ;;;###autoload |
| 247 | (defmacro bind-key* (key-name command &optional predicate) | 247 | (defmacro bind-key* (key-name command &optional predicate) |
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 7d7217d094b..43106b72343 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el | |||
| @@ -53,11 +53,18 @@ | |||
| 53 | ;; iterating over them to "disable all themes" won't disable it. | 53 | ;; iterating over them to "disable all themes" won't disable it. |
| 54 | (setq custom-enabled-themes (remq 'use-package custom-enabled-themes)) | 54 | (setq custom-enabled-themes (remq 'use-package custom-enabled-themes)) |
| 55 | 55 | ||
| 56 | (if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) | 56 | (eval-when-compile |
| 57 | (defsubst hash-table-keys (hash-table) | 57 | (if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) |
| 58 | "Return a list of keys in HASH-TABLE." | 58 | (progn |
| 59 | (cl-loop for k being the hash-keys of hash-table collect k)) | 59 | (defsubst hash-table-keys (hash-table) |
| 60 | (eval-when-compile (require 'subr-x))) | 60 | "Return a list of keys in HASH-TABLE." |
| 61 | (cl-loop for k being the hash-keys of hash-table collect k)) | ||
| 62 | (defsubst string-suffix-p (suffix string &optional ignore-case) | ||
| 63 | (let ((start-pos (- (length string) (length suffix)))) | ||
| 64 | (and (>= start-pos 0) | ||
| 65 | (eq t (compare-strings suffix nil nil | ||
| 66 | string start-pos nil ignore-case)))))) | ||
| 67 | (require 'subr-x))) | ||
| 61 | 68 | ||
| 62 | (eval-when-compile | 69 | (eval-when-compile |
| 63 | (require 'regexp-opt)) | 70 | (require 'regexp-opt)) |