From: Mark Wooding Date: Sat, 25 Mar 2023 13:02:01 +0000 (+0000) Subject: el/dot-emacs.el: Open-code `string-suffix-p' for older Emacen. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/be2322dfd6a5b7c34e9dfe8faf821c0a0162fda3 el/dot-emacs.el: Open-code `string-suffix-p' for older Emacen. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 4e162fd..2c829c8 100644 --- 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))))