chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9331bb8
)
el/dot-emacs.el (mdw-regexp): Sort the input list.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 17 Feb 2024 14:34:24 +0000
(14:34 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 17 Feb 2024 14:55:46 +0000
(14:55 +0000)
It's compile time. Nobody cares about the extra time, and it's a weight
off of my mind as a caller.
el/dot-emacs.el
patch
|
blob
|
blame
|
history
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index 48819b48886dc8e44ca23225ee7eb62b46b3b18e..7fe8757bc67f82cdb07aea60aa32f526abf235e5 100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-62,7
+62,7
@@
(defmacro mdw-regexps (&rest list)
"Turn a LIST of strings into a single regular expression at compile-time."
(declare (indent nil)
(debug 0))
- `',(make-regexp
list
))
+ `',(make-regexp
(sort (copy-list list) #'string<)
))
(defun mdw-wrong ()
"This is not the key sequence you're looking for."