From 19ec74c50ebbf7f31997384e62b799fde99e7213 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Wed, 8 Feb 2012 08:02:10 +0000 Subject: emacs: Rework crypto switch toggle. Re-work the existing crypto switch toggle to be based on a persistant buffer-local variable. To allow this, modify `notmuch-show-refresh-view' to erase and re-draw in the current buffer rather than killing the current buffer and creating a new one. (This will also allow more per-buffer behaviour in future patches.) Add a binding ('$') to toggle crypto processing of the current buffer and remove the prefix argument approach that achieves a similar result. --- emacs/notmuch.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'emacs/notmuch.el') diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 11113fe8..5b4f1c5a 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -494,9 +494,9 @@ Complete list of currently available key bindings: "Return a list of authors for the current region" (notmuch-search-properties-in-region 'notmuch-search-subject beg end)) -(defun notmuch-search-show-thread (&optional crypto-switch) +(defun notmuch-search-show-thread () "Display the currently selected thread." - (interactive "P") + (interactive) (let ((thread-id (notmuch-search-find-thread-id)) (subject (notmuch-prettify-subject (notmuch-search-find-subject)))) (if (> (length thread-id) 0) @@ -504,8 +504,7 @@ Complete list of currently available key bindings: (current-buffer) notmuch-search-query-string ;; Name the buffer based on the subject. - (concat "*" (truncate-string-to-width subject 30 nil nil t) "*") - crypto-switch) + (concat "*" (truncate-string-to-width subject 30 nil nil t) "*")) (message "End of search results.")))) (defun notmuch-search-reply-to-thread (&optional prompt-for-sender) -- cgit v1.2.3