Skip to content

Commit aa41909

Browse files
committed
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.
1 parent f9b61ba commit aa41909

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

lisp/epa-mail.el

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,17 @@ USAGE would be `sign' or `encrypt'."
7070
The buffer is expected to contain a mail message."
7171
(declare (interactive-only t))
7272
(interactive)
73-
(epa-decrypt-armor-in-region (point-min) (point-max)))
73+
(with-suppressed-warnings ((interactive-only epa-decrypt-armor-in-region))
74+
(epa-decrypt-armor-in-region (point-min) (point-max))))
7475

7576
;;;###autoload
7677
(defun epa-mail-verify ()
7778
"Verify OpenPGP cleartext signed messages in the current buffer.
7879
The buffer is expected to contain a mail message."
7980
(declare (interactive-only t))
8081
(interactive)
81-
(epa-verify-cleartext-in-region (point-min) (point-max)))
82+
(with-suppressed-warnings ((interactive-only epa-verify-cleartext-in-region))
83+
(epa-verify-cleartext-in-region (point-min) (point-max))))
8284

8385
;;;###autoload
8486
(defun epa-mail-sign (start end signers mode)
@@ -104,7 +106,8 @@ If no one is selected, default secret key is used. "
104106
(epa--read-signature-type)
105107
'clear)))))
106108
(let ((inhibit-read-only t))
107-
(epa-sign-region start end signers mode)))
109+
(with-suppressed-warnings ((interactive-only epa-sign-region))
110+
(epa-sign-region start end signers mode))))
108111

109112
(defun epa-mail-default-recipients ()
110113
"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. "
223226

224227
;; Don't let some read-only text stop us from encrypting.
225228
(let ((inhibit-read-only t))
226-
(epa-encrypt-region start (point-max) recipient-keys signers signers))))
229+
(with-suppressed-warnings ((interactive-only epa-encrypt-region))
230+
(epa-encrypt-region start (point-max)
231+
recipient-keys signers signers)))))
227232

228233
;;;###autoload
229234
(defun epa-mail-import-keys ()

lisp/epa.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,8 @@ See the reason described in the `epa-verify-region' documentation."
995995
nil t))
996996
(unless cleartext-end
997997
(error "No cleartext tail"))
998-
(epa-verify-region cleartext-start cleartext-end))))))
998+
(with-suppressed-warnings ((interactive-only epa-verify-region))
999+
(epa-verify-region cleartext-start cleartext-end)))))))
9991000

10001001
;;;###autoload
10011002
(defun epa-sign-region (start end signers mode)

0 commit comments

Comments
 (0)