summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs.d/init.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 94a5c81c..52cb4e56 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -3605,6 +3605,14 @@ mutt's review view, after exiting EDITOR."
(apply orig-fun args)))
(advice-add 'gnus-summary-exit :around #'spw/gnus-summary-exit)
+(defun spw/gnus-summary-exit-no-update (&optional no-questions)
+ (list (or (and (spw/gnus-specs-search-notmuch-p)
+ (not (eq (current-buffer)
+ spw/saveable-notmuch-nnselect-summary)))
+ no-questions)))
+(advice-add 'gnus-summary-exit-no-update
+ :filter-args #'spw/gnus-summary-exit-no-update)
+
(defun gnus-user-format-function-summary (_ignore)
(if (and (spw/gnus-specs-search-notmuch-p)
(not (eq (current-buffer) spw/saveable-notmuch-nnselect-summary)))
@@ -3895,10 +3903,6 @@ mutt's review view, after exiting EDITOR."
(define-key gnus-summary-mode-map [f5] #'spw/gnus-fastmail-learn-spam)
(define-key gnus-summary-mode-map "\C-z\C-s" #'spw/gnus-fastmail-learn-spam))
-(defun spw/gnus-with-expert (orig-fun &rest args)
- (let ((gnus-expert-user t)) (apply orig-fun args)))
-(advice-add #'gnus-summary-exit-no-update :around #'spw/gnus-with-expert)
-
;;;; rcirc