1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Suppress interactive-only warnings in epa*.el

* lisp/epa-mail.el (epa-mail-decrypt, epa-mail-verify)
(epa-mail-sign, epa-mail-encrypt): Ditto.

* lisp/epa.el (epa-verify-cleartext-in-region): Suppress warnings
about calling interactive-only functions, because these are
interactive-only thin wrappers around those functions.
This commit is contained in:
Lars Ingebrigtsen 2019-06-12 16:17:25 +02:00
parent f9b61ba72e
commit aa41909c85
2 changed files with 11 additions and 5 deletions

View File

@ -70,7 +70,8 @@ USAGE would be `sign' or `encrypt'."
The buffer is expected to contain a mail message."
(declare (interactive-only t))
(interactive)
(epa-decrypt-armor-in-region (point-min) (point-max)))
(with-suppressed-warnings ((interactive-only epa-decrypt-armor-in-region))
(epa-decrypt-armor-in-region (point-min) (point-max))))
;;;###autoload
(defun epa-mail-verify ()
@ -78,7 +79,8 @@ The buffer is expected to contain a mail message."
The buffer is expected to contain a mail message."
(declare (interactive-only t))
(interactive)
(epa-verify-cleartext-in-region (point-min) (point-max)))
(with-suppressed-warnings ((interactive-only epa-verify-cleartext-in-region))
(epa-verify-cleartext-in-region (point-min) (point-max))))
;;;###autoload
(defun epa-mail-sign (start end signers mode)
@ -104,7 +106,8 @@ If no one is selected, default secret key is used. "
(epa--read-signature-type)
'clear)))))
(let ((inhibit-read-only t))
(epa-sign-region start end signers mode)))
(with-suppressed-warnings ((interactive-only epa-sign-region))
(epa-sign-region start end signers mode))))
(defun epa-mail-default-recipients ()
"Return the default list of encryption recipients for a mail buffer."
@ -223,7 +226,9 @@ If no one is selected, symmetric encryption will be performed. "
;; Don't let some read-only text stop us from encrypting.
(let ((inhibit-read-only t))
(epa-encrypt-region start (point-max) recipient-keys signers signers))))
(with-suppressed-warnings ((interactive-only epa-encrypt-region))
(epa-encrypt-region start (point-max)
recipient-keys signers signers)))))
;;;###autoload
(defun epa-mail-import-keys ()

View File

@ -995,7 +995,8 @@ See the reason described in the `epa-verify-region' documentation."
nil t))
(unless cleartext-end
(error "No cleartext tail"))
(epa-verify-region cleartext-start cleartext-end))))))
(with-suppressed-warnings ((interactive-only epa-verify-region))
(epa-verify-region cleartext-start cleartext-end)))))))
;;;###autoload
(defun epa-sign-region (start end signers mode)