From 63e889be9e3717af5d72bc84dca589ba5ee42856 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Mon, 30 Oct 2023 14:25:02 -0400 Subject: fix --- emacs/.config/emacs-kj/lisp/kj-email.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'emacs/.config') 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) -- cgit v1.2.3