summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-02-24 11:33:59 +0800
committerSean Whitton <spwhitton@spwhitton.name>2024-02-24 11:34:08 +0800
commitdd3af7eb6203932573a1ff9e93549c6bca1b7112 (patch)
tree7cdfd6d70eac09e33258ee08796da18aeb4efdb6
parent1765b30e8037213ffee6635cc9a8b4ef3faf239c (diff)
downloaddotfiles-dd3af7eb6203932573a1ff9e93549c6bca1b7112.tar.gz
prefix arg to avoid marking message ready to send
-rw-r--r--.emacs.d/init.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 888b27f2..6dc25e3e 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -2865,12 +2865,12 @@ Called by '~/src/dotfiles/bin/emacsclient --spw/update-environment'."
(setq spw/message-normalised nil)
(message "Message marked as not ready to send"))
-(defun spw/normalise-message ()
+(defun spw/normalise-message (arg)
"Auto-format a message; to be used just prior to sending it.
The state after this function has been called is meant to be like
mutt's review view, after exiting EDITOR."
- (interactive)
+ (interactive "P")
(message-templ-config-exec)
(save-excursion
(spw/message-goto-body)
@@ -2912,18 +2912,20 @@ mutt's review view, after exiting EDITOR."
;; (narrow-to-region body (point))
;; (message-fill-yanked-message)))
;; (message "Hit undo if the quoted message was too aggressively wrapped"))
- (setq spw/message-normalised t))
+ (if arg
+ (message "Normalised but not marked ready to send")
+ (setq spw/message-normalised t)))
-(defun spw/message-kill-and-normalise ()
- (interactive)
+(defun spw/message-kill-and-normalise (arg)
+ (interactive "P")
(newline)
(message-kill-to-signature)
- (spw/normalise-message))
+ (spw/normalise-message arg))
(defun spw/message-send-and-exit ()
(interactive)
(when (or spw/message-normalised
- (y-or-n-p "Send message which has not been auto-formatted?"))
+ (y-or-n-p "Send message which has not been marked ready?"))
(call-interactively #'message-send-and-exit)))
(defun spw/message-maybe-sign ()