]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/mail/footnote.el (footnote-hebrew-numeric-regex): dedup rx
authorMattias Engdegård <mattiase@acm.org>
Thu, 3 Aug 2023 07:57:33 +0000 (09:57 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 3 Aug 2023 08:17:55 +0000 (10:17 +0200)
This is a cosmetic change that silences a new Relint complaint;
the resulting regexp remains unchanged.

lisp/mail/footnote.el

index b88fd405da8f41badad58beb6183850fa810dafa..4b2770ee3a1df639f7f131d98b93d2f774337579 100644 (file)
@@ -347,10 +347,11 @@ Use Unicode characters for footnoting."
     ("ק" "ר" "ש" "ת" "תק" "תר" "תש" "תת" "תתק")))
 
 (defconst footnote-hebrew-numeric-regex
-  (let ((numchars (string-to-list
-                  (apply #'concat (apply #'append footnote-hebrew-numeric)))))
+  (let ((numchars
+         (delete-dups
+          (string-to-list
+           (apply #'concat (apply #'append footnote-hebrew-numeric))))))
     (rx-to-string `(1+ (in ?' ,@numchars)))))
-;; (defconst footnote-hebrew-numeric-regex "\\([אבגדהוזחט]'\\)?\\(ת\\)?\\(ת\\)?\\([קרשת]\\)?\\([טיכלמנסעפצ]\\)?\\([אבגדהוזחט]\\)?")
 
 (defun footnote--hebrew-numeric (n)
   "Supports 9999 footnotes, then rolls over."