summaryrefslogtreecommitdiff
path: root/emacs/.config
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.config')
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-email.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/.config/emacs-kj/lisp/kj-email.el b/emacs/.config/emacs-kj/lisp/kj-email.el
index bc694f0..2d74164 100644
--- a/emacs/.config/emacs-kj/lisp/kj-email.el
+++ b/emacs/.config/emacs-kj/lisp/kj-email.el
@@ -10,6 +10,14 @@
(add-hook 'message-mode-hook 'turn-off-auto-fill)
(add-hook 'message-mode-hook 'visual-line-mode)
+(defun kj/confirm-empty-subject ()
+ "Allow user to quit when current message subject is empty."
+ (or (message-field-value "Subject")
+ (yes-or-no-p "Really send without Subject? ")
+ (keyboard-quit)))
+
+(add-hook 'message-send-hook #'kj/confirm-empty-subject)
+
(setq notmuch-saved-searches
'((:name "inbox" :query "tag:inbox -tag:_gz" :key "i" :search-type tree)
(:name "unread" :query "tag:unread" :key "u" :search-type tree)