diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2023-03-24 17:42:07 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2023-04-16 13:07:22 -0700 |
commit | f345a9e46987d426dc128e31a963399011343b46 (patch) | |
tree | 3d3a91ab10aff34869ae7986b8cb35a208dd4dba | |
parent | 761e1bd10f679cca74728f343dcab84116514efb (diff) | |
download | dotfiles-f345a9e46987d426dc128e31a963399011343b46.tar.gz |
now we advise gnus-summary-exit, prompt when exiting without saving
-rw-r--r-- | .emacs.d/init.el | 12 |
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 |