From f591d30d4ebe9f1fe5636806a88dc407685d5e8f Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 1 Sep 2025 00:52:03 +0300 Subject: [PATCH] mu4e-labels: don't require emacs-30 rx Use an old-school regexp instead. --- mu4e/mu4e-labels.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/mu4e/mu4e-labels.el b/mu4e/mu4e-labels.el index a3a6f04c..053d24ba 100644 --- a/mu4e/mu4e-labels.el +++ b/mu4e/mu4e-labels.el @@ -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