mirror of https://github.com/djcb/mu.git
Add a custom variable to decide if we can edit any message or just a draft message.
Signed-off-by: Ritho <palvarez@ritho.net>
This commit is contained in:
parent
51997d26e8
commit
edc0cccb96
|
@ -81,6 +81,15 @@
|
||||||
;;; Configuration
|
;;; Configuration
|
||||||
;; see mu4e-drafts.el
|
;; see mu4e-drafts.el
|
||||||
|
|
||||||
|
(defcustom mu4e-allow-edit-any-message nil
|
||||||
|
"Whether to allow to edit any message or just the draft messages.
|
||||||
|
Setting this to t allows any message to be edited, not just the draft messages.
|
||||||
|
|
||||||
|
Changes to this value only take effect after (re)starting the mu
|
||||||
|
session."
|
||||||
|
:type 'boolean
|
||||||
|
:group 'mu4e)
|
||||||
|
|
||||||
;;; Attachments
|
;;; Attachments
|
||||||
(defun mu4e-compose-attach-message (msg)
|
(defun mu4e-compose-attach-message (msg)
|
||||||
"Insert message MSG as an attachment."
|
"Insert message MSG as an attachment."
|
||||||
|
@ -736,6 +745,7 @@ Symbol `edit' is only allowed for draft messages."
|
||||||
(unless (member compose-type '(reply forward edit resend new))
|
(unless (member compose-type '(reply forward edit resend new))
|
||||||
(mu4e-error "Invalid compose type '%S'" compose-type))
|
(mu4e-error "Invalid compose type '%S'" compose-type))
|
||||||
(when (and (eq compose-type 'edit)
|
(when (and (eq compose-type 'edit)
|
||||||
|
(not (eq mu4e-allow-edit-any-message 't))
|
||||||
(not (member 'draft (mu4e-message-field msg :flags))))
|
(not (member 'draft (mu4e-message-field msg :flags))))
|
||||||
(mu4e-warn "Editing is only allowed for draft messages"))
|
(mu4e-warn "Editing is only allowed for draft messages"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue