[PATCH 8/8] emacs: eliminate show-tag-message in favor of just show-tag

Jameson Graef Rollins jrollins at finestructure.net
Sat Apr 7 17:35:38 PDT 2012


notmuch-show-tag-message is now completely redundant with
notmuch-show-tag so we eliminate it to simplify the interface.
---
 emacs/notmuch-show.el |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 69bca02..f174910 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1396,7 +1396,7 @@ current thread."
 
 (defun notmuch-show-mark-read ()
   "Mark the current message as read."
-  (notmuch-show-tag-message "-unread"))
+  (notmuch-show-tag "-unread"))
 
 ;; Functions for getting attributes of several messages in the current
 ;; thread.
@@ -1634,16 +1634,6 @@ than only the current message."
 	    (message (format "Command '%s' exited abnormally with code %d"
 			     shell-command exit-code))))))))
 
-(defun notmuch-show-tag-message (&rest tag-changes)
-  "Change tags for the current message.
-
-TAG-CHANGES is a list of tag operations for `notmuch-tag'."
-  (let* ((current-tags (notmuch-show-get-tags))
-	 (new-tags (notmuch-update-tags current-tags tag-changes)))
-    (unless (equal current-tags new-tags)
-      (funcall 'notmuch-tag (notmuch-show-get-message-id) tag-changes)
-      (notmuch-show-set-tags new-tags))))
-
 (defun notmuch-show-tag (&optional tag-changes)
   "Change tags for the current message.
 
@@ -1768,7 +1758,7 @@ If a prefix argument is given, the message will be
 removed)."
   (interactive "P")
   (let ((op (if unarchive "+" "-")))
-    (notmuch-show-tag-message (concat op "inbox"))))
+    (notmuch-show-tag (concat op "inbox"))))
 
 (defun notmuch-show-archive-message-then-next-or-exit ()
   "Archive the current message, then show the next open message in the current thread.
-- 
1.7.9.1



More information about the notmuch mailing list