]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/htmlfontify.el (hfy-triplet-regex): Use rx.
authorStefan Kangas <stefan@marxist.se>
Sun, 4 Apr 2021 23:35:18 +0000 (01:35 +0200)
committerStefan Kangas <stefan@marxist.se>
Mon, 5 Apr 2021 09:14:34 +0000 (11:14 +0200)
lisp/htmlfontify.el

index 0c8d53482479524fad018291f055f7c33d5f2aa3..550083d0e287fd2b660407ff797aeb460b2875be 100644 (file)
@@ -523,13 +523,10 @@ therefore no longer care about) will be invalid at any time.\n
 (defvar hfy-tmpfont-stack nil
   "An alist of derived fonts resulting from overlays.")
 
-(defconst hfy-hex-regex "[[:xdigit:]]")
-
 (defconst hfy-triplet-regex
-  (concat
-   "\\(" hfy-hex-regex hfy-hex-regex "\\)"
-   "\\(" hfy-hex-regex hfy-hex-regex "\\)"
-   "\\(" hfy-hex-regex hfy-hex-regex "\\)"))
+  (rx (group xdigit xdigit)
+      (group xdigit xdigit)
+      (group xdigit xdigit)))
 
 (defun hfy-interq (set-a set-b)
   "Return the intersection (using `eq') of two lists SET-A and SET-B."