X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tag.el;h=c7a1e3220946ad3a2ec1c1f8afc7b320d9c7ae83;hp=49662c2034ce3c4d13f8bb980695b14ae5541616;hb=df3fab18fe70ea750f6f06da30291c67de7e74f2;hpb=ae06fbfc76edc2ef320a51b6f774079d79078963 diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 49662c20..c7a1e322 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -20,19 +20,22 @@ ;; ;; Authors: Carl Worth ;; Damien Cassou -;; + ;;; Code: -;; -(require 'cl) +(require 'cl-lib) +(eval-when-compile + (require 'pcase)) + (require 'crm) -(require 'notmuch-lib) -(declare-function notmuch-search-tag "notmuch" tag-changes) -(declare-function notmuch-show-tag "notmuch-show" tag-changes) -(declare-function notmuch-tree-tag "notmuch-tree" tag-changes) +(require 'notmuch-lib) -(autoload 'notmuch-jump "notmuch-jump") +(declare-function notmuch-search-tag "notmuch" + (tag-changes &optional beg end only-matched)) +(declare-function notmuch-show-tag "notmuch-show" (tag-changes)) +(declare-function notmuch-tree-tag "notmuch-tree" (tag-changes)) +(declare-function notmuch-jump "notmuch-jump" (action-map prompt)) (define-widget 'notmuch-tag-key-type 'list "A single key tagging binding." @@ -40,7 +43,9 @@ :args '((list :inline t :format "%v" (key-sequence :tag "Key") - (radio :tag "Tag operations" (repeat :tag "Tag list" (string :format "%v" :tag "change")) + (radio :tag "Tag operations" + (repeat :tag "Tag list" + (string :format "%v" :tag "change")) (variable :tag "Tag variable")) (string :tag "Name")))) @@ -57,10 +62,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 @@ -77,7 +85,7 @@ from TAGGING-OPERATIONS." :group 'notmuch-tag) (define-widget 'notmuch-tag-format-type 'lazy - "Customize widget for notmuch-tag-format and friends" + "Customize widget for notmuch-tag-format and friends." :type '(alist :key-type (regexp :tag "Tag") :extra-offset -3 :value-type @@ -112,7 +120,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`." @@ -222,7 +235,7 @@ DATA is the content of an SVG picture (e.g., as returned by (defun notmuch-tag-star-icon () "Return SVG data representing a star icon. This can be used with `notmuch-tag-format-image-data'." -" + "