emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bind-key 0572eaf4e0 08/13: Fix building on Emacs 24.3


From: ELPA Syncer
Subject: [elpa] externals/bind-key 0572eaf4e0 08/13: Fix building on Emacs 24.3
Date: Mon, 14 Nov 2022 15:57:21 -0500 (EST)

branch: externals/bind-key
commit 0572eaf4e0b14b485e7889e672f65230e4ddd2d3
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Fix building on Emacs 24.3
    
    This fixes the following error:
    use-package-core.el:60:32:Error: Cannot open load file: subr-x
---
 use-package-core.el | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/use-package-core.el b/use-package-core.el
index 53bc3ed2a4..9e7b3b56e1 100644
--- a/use-package-core.el
+++ b/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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]