]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: define notmuch-message-queued-tag-changes as buffer-local
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 10 Jan 2021 14:00:53 +0000 (15:00 +0100)
committerDavid Bremner <david@tethera.net>
Wed, 13 Jan 2021 11:21:32 +0000 (07:21 -0400)
Also improve the doc-string.

emacs/notmuch-message.el
emacs/notmuch-mua.el

index f0e9ffcca7e9408cb1d4e1255627f01a03f91aa5..9dc8d056146cd15cdbc179f82582206ae92d1b75 100644 (file)
@@ -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
index b2930051863ffbed832252a7e81312d4404753dd..95d1965b9696ab45781ebe9ecd757727ac191741 100644 (file)
@@ -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)