mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
emacs: tag-jump: make k binding for the reverse tag change map
Currently, by default k invokes the tag-jump menu, and following it by r invokes the reverse tag change jump menu. This is awkward to type (e.g. k r u for undoing a -unread change). This changes it so that k followed by k invokes the reverse menu. We make the key for the reverse map a variable as that makes it possible for a user to change it by editing their .emacs file.
This commit is contained in:
parent
ba8fba3d6a
commit
297d091e1c
1 changed files with 7 additions and 3 deletions
|
@ -485,6 +485,9 @@ begin with a \"+\" or a \"-\". If REVERSE is non-nil, replace all
|
||||||
s)))
|
s)))
|
||||||
tags))
|
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)
|
(defun notmuch-tag-jump (reverse)
|
||||||
"Create a jump menu for tagging operations.
|
"Create a jump menu for tagging operations.
|
||||||
|
|
||||||
|
@ -523,9 +526,10 @@ and vice versa."
|
||||||
(push (list key name-string
|
(push (list key name-string
|
||||||
`(lambda () (,tag-function ',tag-change)))
|
`(lambda () (,tag-function ',tag-change)))
|
||||||
action-map)))
|
action-map)))
|
||||||
(push (list "r" (if reverse
|
(push (list notmuch-tag-jump-reverse-key
|
||||||
"Forward tag changes "
|
(if reverse
|
||||||
"Reverse tag changes")
|
"Forward tag changes "
|
||||||
|
"Reverse tag changes")
|
||||||
(apply-partially 'notmuch-tag-jump (not reverse)))
|
(apply-partially 'notmuch-tag-jump (not reverse)))
|
||||||
action-map)
|
action-map)
|
||||||
(setq action-map (nreverse action-map))
|
(setq action-map (nreverse action-map))
|
||||||
|
|
Loading…
Reference in a new issue