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