diff options
author | John Wiegley <johnw@newartisans.com> | 2022-11-14 12:07:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 12:07:06 -0800 |
commit | 5dad5ff0febaa18b1cf7bfcb339170f92787552d (patch) | |
tree | 4e9c67517c520f36dcccdf46e0b152f048c70d11 /lisp/use-package/use-package-core.el | |
parent | 971634e3f9e5c539f8a0184ca4ec1c4a3f9495ec (diff) | |
parent | 43254ae62f1a775edab9a3c74d0411ba0577de0e (diff) | |
download | emacs-5dad5ff0febaa18b1cf7bfcb339170f92787552d.tar.gz emacs-5dad5ff0febaa18b1cf7bfcb339170f92787552d.tar.bz2 emacs-5dad5ff0febaa18b1cf7bfcb339170f92787552d.zip |
Merge pull request from skangas/ci
GitHub-reference: https://github.com/jwiegley/use-package/issues/1013
Diffstat (limited to 'lisp/use-package/use-package-core.el')
-rw-r--r-- | lisp/use-package/use-package-core.el | 17 |
1 files changed, 12 insertions, 5 deletions
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 @@ ;; iterating over them to "disable all themes" won't disable it. (setq custom-enabled-themes (remq 'use-package custom-enabled-themes)) -(if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) - (defsubst hash-table-keys (hash-table) - "Return a list of keys in HASH-TABLE." - (cl-loop for k being the hash-keys of hash-table collect k)) - (eval-when-compile (require 'subr-x))) +(eval-when-compile + (if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) + (progn + (defsubst hash-table-keys (hash-table) + "Return a list of keys in HASH-TABLE." + (cl-loop for k being the hash-keys of hash-table collect k)) + (defsubst string-suffix-p (suffix string &optional ignore-case) + (let ((start-pos (- (length string) (length suffix)))) + (and (>= start-pos 0) + (eq t (compare-strings suffix nil nil + string start-pos nil ignore-case)))))) + (require 'subr-x))) (eval-when-compile (require 'regexp-opt)) |