summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/init-gnus.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el
index fd02df2..bd0f072 100644
--- a/lisp/init-gnus.el
+++ b/lisp/init-gnus.el
@@ -72,6 +72,14 @@
(gnus-group-exit))))
(add-hook 'kill-emacs-hook 'gnus-grace-exit-before-kill-emacs)
+(defun km/message-confirm-sender ()
+ "Stop sending message from the wrong address."
+ (unless (yes-or-no-p (format "Send message from %s?"
+ (message-field-value "From")))
+ (user-error "Not sending message")))
+
+(add-hook 'message-send-hook 'km/message-confirm-sender)
+
;; Start in topic mode.
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)