]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-tag.el
lib: convert notmuch decryption policy to an enum
[notmuch] / emacs / notmuch-tag.el
index 49662c2034ce3c4d13f8bb980695b14ae5541616..0500927d37ce2b1e0173fb0f6ff7bc159a85018e 100644 (file)
@@ -57,10 +57,13 @@ tagging operations to apply, or a variable which contains a list
 of tagging operations such as `notmuch-archive-tags'. The final
 element is a name for this tagging operation. If the name is
 omitted or empty then the list of tag changes, or the variable
-name is used as the name. The key `r` should not be used as that
-is already bound: it switches the menu to a menu of the reverse
-tagging operations. The reverse of a tagging operation is the
-same list of individual tag-ops but with `+tag` replaced by
+name is used as the name.
+
+The key `notmuch-tag-jump-reverse-key' (k by default) should not
+be used (either as a key, or as the start of a key sequence) as
+it is already bound: it switches the menu to a menu of the
+reverse tagging operations. The reverse of a tagging operation is
+the same list of individual tag-ops but with `+tag` replaced by
 `-tag` and vice versa.
 
 If setting this variable outside of customize then it should be a
@@ -112,7 +115,12 @@ Used in the default value of `notmuch-tag-formats`."
   :group 'notmuch-faces)
 
 (defface notmuch-tag-flagged
-  '((t :foreground "blue"))
+  '((((class color)
+      (background dark))
+     (:foreground "LightBlue1"))
+    (((class color)
+      (background light))
+     (:foreground "blue")))
   "Face used for the flagged tag.
 
 Used in the default value of `notmuch-tag-formats`."
@@ -449,7 +457,7 @@ QUERY should be a string containing the search-terms.
 TAG-CHANGES is a list of strings of the form \"+tag\" or
 \"-tag\" to add or remove tags, respectively.
 
-Note: Other code should always use this function alter tags of
+Note: Other code should always use this function to alter tags of
 messages instead of running (notmuch-call-notmuch-process \"tag\" ..)
 directly, so that hooks specified in notmuch-before-tag-hook and
 notmuch-after-tag-hook will be run."
@@ -485,6 +493,9 @@ begin with a \"+\" or a \"-\". If REVERSE is non-nil, replace all
                s)))
          tags))
 
+(defvar notmuch-tag-jump-reverse-key "k"
+  "The key in tag-jump to switch to the reverse tag changes.")
+
 (defun notmuch-tag-jump (reverse)
   "Create a jump menu for tagging operations.
 
@@ -523,9 +534,10 @@ and vice versa."
        (push (list key name-string
                     `(lambda () (,tag-function ',tag-change)))
              action-map)))
-    (push (list "r" (if reverse
-                       "Forward tag changes "
-                     "Reverse tag changes")
+    (push (list notmuch-tag-jump-reverse-key
+               (if reverse
+                   "Forward tag changes "
+                 "Reverse tag changes")
                (apply-partially 'notmuch-tag-jump (not reverse)))
          action-map)
     (setq action-map (nreverse action-map))