mu4e-labels: don't require emacs-30 rx

Use an old-school regexp instead.
This commit is contained in:
Dirk-Jan C. Binnema
2025-09-01 00:52:03 +03:00
committed by Seth Ladygo
parent 49e4c25bd3
commit f591d30d4e

View File

@ -30,13 +30,15 @@
(require 'mu4e-helpers)
(defconst mu4e-label-regex
(rx-let ((taboo (any cntrl blank "\"'\\/`$"))
(taboo1-extra (any "-+")))
(rx (seq
;; First character: base forbidden + extra chars
(not (or taboo taboo1-extra))
;; Rest: just base forbidden chars
(zero-or-more (not taboo)))))
"[^\"'+/\\`[:cntrl:][:blank:]-][^\"'/\\`[:cntrl:][:blank:]]*"
;;Emacs 30:
;;(rx-let ((taboo (any cntrl blank "\"'\\/`$"))
;; (taboo1-extra (any "-+")))
;; (rx (seq
;; ;; First character: base forbidden + extra chars
;; (not (or taboo taboo1-extra))
;; ;; Rest: just base forbidden chars
;; (zero-or-more (not taboo)))))
"Unanchored regular expression matching a valid label.
Any character is allowed that is not a control-character, a