aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-09-18 15:21:25 +0200
committerLars Ingebrigtsen2019-09-18 15:21:34 +0200
commit37a4233a366797360c2f4f475591a3406586bcfb (patch)
tree460bf1b2fae2f91609ffd4c8afe92147172dabc1
parenta39652b49d93cf1556c0b10378e04bf0634c1ee1 (diff)
downloademacs-37a4233a366797360c2f4f475591a3406586bcfb.tar.gz
emacs-37a4233a366797360c2f4f475591a3406586bcfb.zip
Fix up the previous mh-mime warning suppression
* lisp/mh-e/mh-acros.el (mh-dlet*): Suppress warnings about prefix-less bindings. * lisp/mh-e/mh-mime.el (mh-insert-mime-security-button): Remove the warning removal here. (mh-insert-mime-button): And here.
-rw-r--r--lisp/mh-e/mh-acros.el14
-rw-r--r--lisp/mh-e/mh-mime.el112
2 files changed, 65 insertions, 61 deletions
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index c017419df2e..0f15d3eb71b 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -270,10 +270,16 @@ MH-E functions."
270 (declare (debug let) (indent 1)) 270 (declare (debug let) (indent 1))
271 ;; Works in both lexical and non-lexical mode. 271 ;; Works in both lexical and non-lexical mode.
272 `(progn 272 `(progn
273 ,@(mapcar (lambda (binder) 273 (with-suppressed-warnings ((lexical
274 `(defvar ,(if (consp binder) (car binder) binder))) 274 ,@(mapcar (lambda (binder)
275 binders) 275 (if (consp binder)
276 (let* ,binders ,@body))) 276 (car binder)
277 binder))
278 binders)))
279 ,@(mapcar (lambda (binder)
280 `(defvar ,(if (consp binder) (car binder) binder)))
281 binders)
282 (let* ,binders ,@body))))
277 283
278(provide 'mh-acros) 284(provide 'mh-acros)
279 285
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index c6b5aaec347..d74e79f1cb0 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -859,24 +859,23 @@ by commands like \"K v\" which operate on individual MIME parts."
859 (if (string-match ".*/" name) (setq name (substring name (match-end 0)))) 859 (if (string-match ".*/" name) (setq name (substring name (match-end 0))))
860 ;; These vars are passed by dynamic-scoping to 860 ;; These vars are passed by dynamic-scoping to
861 ;; mh-mime-button-line-format-alist via gnus-eval-format. 861 ;; mh-mime-button-line-format-alist via gnus-eval-format.
862 (with-suppressed-warnings ((lexical index description dots)) 862 (mh-dlet* ((index index)
863 (mh-dlet* ((index index) 863 (description (mail-decode-encoded-word-string
864 (description (mail-decode-encoded-word-string 864 (or (mm-handle-description handle) "")))
865 (or (mm-handle-description handle) ""))) 865 (dots (if (or displayed (mm-handle-displayed-p handle))
866 (dots (if (or displayed (mm-handle-displayed-p handle)) 866 " " "..."))
867 " " "...")) 867 (long-type (concat type (and (not (equal name ""))
868 (long-type (concat type (and (not (equal name "")) 868 (concat "; " name)))))
869 (concat "; " name))))) 869 (unless (equal description "")
870 (unless (equal description "") 870 (setq long-type (concat " --- " long-type)))
871 (setq long-type (concat " --- " long-type))) 871 (unless (bolp) (insert "\n"))
872 (unless (bolp) (insert "\n")) 872 (setq begin (point))
873 (setq begin (point)) 873 (gnus-eval-format
874 (gnus-eval-format 874 mh-mime-button-line-format mh-mime-button-line-format-alist
875 mh-mime-button-line-format mh-mime-button-line-format-alist 875 `(,@(mh-gnus-local-map-property mh-mime-button-map)
876 `(,@(mh-gnus-local-map-property mh-mime-button-map) 876 mh-callback mh-mm-display-part
877 mh-callback mh-mm-display-part 877 mh-part ,index
878 mh-part ,index 878 mh-data ,handle)))
879 mh-data ,handle))))
880 (setq end (point)) 879 (setq end (point))
881 (widget-convert-button 880 (widget-convert-button
882 'link begin end 881 'link begin end
@@ -901,45 +900,44 @@ by commands like \"K v\" which operate on individual MIME parts."
901 begin end face) 900 begin end face)
902 ;; These vars are passed by dynamic-scoping to 901 ;; These vars are passed by dynamic-scoping to
903 ;; mh-mime-security-button-line-format-alist via gnus-eval-format. 902 ;; mh-mime-security-button-line-format-alist via gnus-eval-format.
904 (with-suppressed-warnings ((lexical type info details)) 903 (mh-dlet* ((type (concat crypto-type
905 (mh-dlet* ((type (concat crypto-type 904 (if (equal (car handle) "multipart/signed")
906 (if (equal (car handle) "multipart/signed") 905 " Signed" " Encrypted")
907 " Signed" " Encrypted") 906 " Part"))
908 " Part")) 907 (info (or (mh-mm-handle-multipart-ctl-parameter
909 (info (or (mh-mm-handle-multipart-ctl-parameter 908 handle 'gnus-info)
910 handle 'gnus-info) 909 "Undecided"))
911 "Undecided")) 910 (details (mh-mm-handle-multipart-ctl-parameter
912 (details (mh-mm-handle-multipart-ctl-parameter 911 handle 'gnus-details))
913 handle 'gnus-details)) 912 pressed-details)
914 pressed-details) 913 (setq details (if details (concat "\n" details) ""))
915 (setq details (if details (concat "\n" details) "")) 914 (setq pressed-details (if mh-mime-security-button-pressed details ""))
916 (setq pressed-details (if mh-mime-security-button-pressed details "")) 915 (setq face (mh-mime-security-button-face info))
917 (setq face (mh-mime-security-button-face info)) 916 (unless (bolp) (insert "\n"))
918 (unless (bolp) (insert "\n")) 917 (setq begin (point))
919 (setq begin (point)) 918 (gnus-eval-format
920 (gnus-eval-format 919 mh-mime-security-button-line-format
921 mh-mime-security-button-line-format 920 mh-mime-security-button-line-format-alist
922 mh-mime-security-button-line-format-alist 921 `(,@(mh-gnus-local-map-property mh-mime-security-button-map)
923 `(,@(mh-gnus-local-map-property mh-mime-security-button-map) 922 mh-button-pressed ,mh-mime-security-button-pressed
924 mh-button-pressed ,mh-mime-security-button-pressed 923 mh-callback mh-mime-security-press-button
925 mh-callback mh-mime-security-press-button 924 mh-line-format ,mh-mime-security-button-line-format
926 mh-line-format ,mh-mime-security-button-line-format 925 mh-data ,handle))
927 mh-data ,handle)) 926 (setq end (point))
928 (setq end (point)) 927 (widget-convert-button 'link begin end
929 (widget-convert-button 'link begin end 928 :mime-handle handle
930 :mime-handle handle 929 :action 'mh-widget-press-button
931 :action 'mh-widget-press-button 930 :button-keymap mh-mime-security-button-map
932 :button-keymap mh-mime-security-button-map 931 :button-face face
933 :button-face face 932 :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.")
934 :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.") 933 (dolist (ov (mh-funcall-if-exists overlays-in begin end))
935 (dolist (ov (mh-funcall-if-exists overlays-in begin end)) 934 (mh-funcall-if-exists overlay-put ov 'evaporate t))
936 (mh-funcall-if-exists overlay-put ov 'evaporate t)) 935 (when (equal info "Failed")
937 (when (equal info "Failed") 936 (let* ((type (if (equal (car handle) "multipart/signed")
938 (let* ((type (if (equal (car handle) "multipart/signed") 937 "verification" "decryption"))
939 "verification" "decryption")) 938 (warning (if (equal type "decryption")
940 (warning (if (equal type "decryption") 939 "(passphrase may be incorrect)" "")))
941 "(passphrase may be incorrect)" ""))) 940 (message "%s %s failed %s" crypto-type type warning))))))
942 (message "%s %s failed %s" crypto-type type warning)))))))
943 941
944(defun mh-mime-security-button-face (info) 942(defun mh-mime-security-button-face (info)
945 "Return the button face to use for encrypted/signed mail based on INFO." 943 "Return the button face to use for encrypted/signed mail based on INFO."