~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
734a6b7
)
el/dot-emacs.el: Open-code `string-suffix-p' for older Emacen.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 25 Mar 2023 13:02:01 +0000
(13:02 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 25 Mar 2023 13:05:16 +0000
(13:05 +0000)
el/dot-emacs.el
patch
|
blob
|
blame
|
history
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index
4e162fd
..
2c829c8
100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-2291,7
+2291,10
@@
indentation anyway."
(let ((output nil))
(dolist (item first)
(let ((key (car item)) (value (cdr item)))
- (if (string-suffix-p "-alist" (symbol-name key))
+ (if (let* ((key-name (symbol-name key))
+ (key-len (length key-name)))
+ (and (>= key-len 5)
+ (string= (subseq key-name (- key-len 5)) "-alist")))
(push (cons key
(mdw-merge-style-alists value
(cdr (assoc key second))))