mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
emacs: define notmuch-message-queued-tag-changes as buffer-local
Also improve the doc-string.
This commit is contained in:
parent
d8075ce50b
commit
117501d5ce
2 changed files with 13 additions and 13 deletions
|
@ -50,14 +50,14 @@ the \"inbox\" tag, you would set:
|
|||
:type '(repeat string)
|
||||
:group 'notmuch-send)
|
||||
|
||||
(defconst notmuch-message-queued-tag-changes nil
|
||||
"List of messages and corresponding tag-changes to be applied when sending a message.
|
||||
(defvar-local notmuch-message-queued-tag-changes nil
|
||||
"List of tag changes to be applied when sending a message.
|
||||
|
||||
This variable is overridden by buffer-local versions in message
|
||||
buffers where tag changes should be triggered when sending off
|
||||
the message. Each item in this list is a list of strings, where
|
||||
the first is a notmuch query and the rest are the tag changes to
|
||||
be applied to the matching messages.")
|
||||
A list of queries and tag changes that are to be applied to them
|
||||
when the message that was composed in the current buffer is being
|
||||
send. Each item in this list is a list of strings, where the
|
||||
first is a notmuch query and the rest are the tag changes to be
|
||||
applied to the matching messages.")
|
||||
|
||||
(defun notmuch-message-apply-queued-tag-changes ()
|
||||
;; Apply the tag changes queued in the buffer-local variable
|
||||
|
|
|
@ -266,8 +266,8 @@ Typically this is added to `notmuch-mua-send-hook'."
|
|||
;; Create a buffer-local queue for tag changes triggered when
|
||||
;; sending the reply.
|
||||
(when notmuch-message-replied-tags
|
||||
(setq-local notmuch-message-queued-tag-changes
|
||||
(list (cons query-string notmuch-message-replied-tags))))
|
||||
(setq notmuch-message-queued-tag-changes
|
||||
(list (cons query-string notmuch-message-replied-tags))))
|
||||
;; Insert the message body - but put it in front of the signature
|
||||
;; if one is present, and after any other content
|
||||
;; message*setup-hooks may have added to the message body already.
|
||||
|
@ -507,10 +507,10 @@ the From: address."
|
|||
;; Create a buffer-local queue for tag changes triggered when
|
||||
;; sending the message.
|
||||
(when notmuch-message-forwarded-tags
|
||||
(setq-local notmuch-message-queued-tag-changes
|
||||
(cl-loop for id in forward-queries
|
||||
collect
|
||||
(cons id notmuch-message-forwarded-tags))))
|
||||
(setq notmuch-message-queued-tag-changes
|
||||
(cl-loop for id in forward-queries
|
||||
collect
|
||||
(cons id notmuch-message-forwarded-tags))))
|
||||
;; `message-forward-make-body' shows the User-agent header. Hide
|
||||
;; it again.
|
||||
(message-hide-headers)
|
||||
|
|
Loading…
Reference in a new issue