From: Lars Ingebrigtsen Date: Wed, 12 Jun 2019 14:17:25 +0000 (+0200) Subject: Suppress interactive-only warnings in epa*.el X-Git-Tag: emacs-27.0.90~2611 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aa41909c853da51699c863619c7d3204d05328a8;p=emacs.git 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. --- diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index 1bb8d9bfde1..e0c9b43f1b2 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -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 () diff --git a/lisp/epa.el b/lisp/epa.el index 59c11ab5412..ad67c238dc2 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -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)