chiark
/
gitweb
/
~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 4e162fdc21937255d33528d3dcb2bb1c27ed94e5..2c829c820ad78f159660e5556b913ab3b97db50c 100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-2291,7
+2291,10
@@
(defun mdw-merge-style-alists (first second)
(let ((output nil))
(dolist (item first)
(let ((key (car item)) (value (cdr item)))
(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))))
(push (cons key
(mdw-merge-style-alists value
(cdr (assoc key second))))