aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-01-10 15:01:02 +0100
committerDavid Bremner <david@tethera.net>2021-01-15 06:43:13 -0400
commitb614ea756316a18d90f5acfa352e82f2ffec8a67 (patch)
treeeb11a2e1db5d6013156050273a0b13ac56a08b64 /emacs/notmuch.el
parent692acdf9da2ca93d46259ca31780ed632c2975c4 (diff)
emacs: remove variable notmuch-search-disjunctive-regexp
The value is the only possible value, it is only used in one place, and using a global variable serves no purpose but to make things more complicated.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index f8c97c5d..ccece811 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -232,8 +232,6 @@ there will be called at other points of notmuch execution."
(defvar notmuch-search-target-thread)
(defvar notmuch-search-target-line)
-(defvar notmuch-search-disjunctive-regexp "\\<[oO][rR]\\>")
-
;;; Movement
(defun notmuch-search-scroll-up ()
@@ -1079,10 +1077,8 @@ default sort order is defined by `notmuch-search-oldest-first'."
(defun notmuch-group-disjunctive-query-string (query-string)
"Group query if it contains a complex expression.
-
-Enclose QUERY-STRING in parentheses if it matches
-`notmuch-search-disjunctive-regexp'."
- (if (string-match-p notmuch-search-disjunctive-regexp query-string)
+Enclose QUERY-STRING in parentheses if contains \"OR\" operators."
+ (if (string-match-p "\\<[oO][rR]\\>" query-string)
(concat "( " query-string " )")
query-string))