diff options
| author | Lars Ingebrigtsen | 2019-06-12 16:17:25 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-12 16:17:25 +0200 |
| commit | aa41909c853da51699c863619c7d3204d05328a8 (patch) | |
| tree | 94fc255cd4a59b99347227843b1afeffff583620 | |
| parent | f9b61ba72e619b6801e71436793b3c05e5d0efee (diff) | |
| download | emacs-aa41909c853da51699c863619c7d3204d05328a8.tar.gz emacs-aa41909c853da51699c863619c7d3204d05328a8.zip | |
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.
| -rw-r--r-- | lisp/epa-mail.el | 13 | ||||
| -rw-r--r-- | lisp/epa.el | 3 |
2 files changed, 11 insertions, 5 deletions
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'." | |||
| 70 | The buffer is expected to contain a mail message." | 70 | The buffer is expected to contain a mail message." |
| 71 | (declare (interactive-only t)) | 71 | (declare (interactive-only t)) |
| 72 | (interactive) | 72 | (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)))) | ||
| 74 | 75 | ||
| 75 | ;;;###autoload | 76 | ;;;###autoload |
| 76 | (defun epa-mail-verify () | 77 | (defun epa-mail-verify () |
| @@ -78,7 +79,8 @@ The buffer is expected to contain a mail message." | |||
| 78 | The buffer is expected to contain a mail message." | 79 | The buffer is expected to contain a mail message." |
| 79 | (declare (interactive-only t)) | 80 | (declare (interactive-only t)) |
| 80 | (interactive) | 81 | (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)))) | ||
| 82 | 84 | ||
| 83 | ;;;###autoload | 85 | ;;;###autoload |
| 84 | (defun epa-mail-sign (start end signers mode) | 86 | (defun epa-mail-sign (start end signers mode) |
| @@ -104,7 +106,8 @@ If no one is selected, default secret key is used. " | |||
| 104 | (epa--read-signature-type) | 106 | (epa--read-signature-type) |
| 105 | 'clear))))) | 107 | 'clear))))) |
| 106 | (let ((inhibit-read-only t)) | 108 | (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)))) | ||
| 108 | 111 | ||
| 109 | (defun epa-mail-default-recipients () | 112 | (defun epa-mail-default-recipients () |
| 110 | "Return the default list of encryption recipients for a mail buffer." | 113 | "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. " | |||
| 223 | 226 | ||
| 224 | ;; Don't let some read-only text stop us from encrypting. | 227 | ;; Don't let some read-only text stop us from encrypting. |
| 225 | (let ((inhibit-read-only t)) | 228 | (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))))) | ||
| 227 | 232 | ||
| 228 | ;;;###autoload | 233 | ;;;###autoload |
| 229 | (defun epa-mail-import-keys () | 234 | (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." | |||
| 995 | nil t)) | 995 | nil t)) |
| 996 | (unless cleartext-end | 996 | (unless cleartext-end |
| 997 | (error "No cleartext tail")) | 997 | (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))))))) | ||
| 999 | 1000 | ||
| 1000 | ;;;###autoload | 1001 | ;;;###autoload |
| 1001 | (defun epa-sign-region (start end signers mode) | 1002 | (defun epa-sign-region (start end signers mode) |