--- gnus-art.el 2006-04-28 15:59:02.000000000 +0100 +++ gnus-art-new.el 2006-04-28 15:58:35.000000000 +0100 @@ -870,8 +870,7 @@ :group 'gnus-article-mime :type '(repeat regexp)) -(defcustom gnus-buttonized-mime-types (unless (eq mm-verify-option 'never) - '("multipart/signed")) +(defcustom gnus-buttonized-mime-types nil "List of MIME types that should be given buttons when rendered inline. If set, this variable overrides `gnus-unbuttonized-mime-types'. To see e.g. security buttons you could set this to @@ -4993,6 +4992,9 @@ ;; Exclude a newline. (1- (point)) (point))) + (when gnus-article-button-face + (gnus-overlay-put (gnus-make-overlay b e) + 'face gnus-article-button-face)) (widget-convert-button 'link b e :mime-handle handle @@ -7694,6 +7696,9 @@ ;; Exclude a newline. (1- (point)) (point))) + (when gnus-article-button-face + (gnus-overlay-put (gnus-make-overlay b e) + 'face gnus-article-button-face)) (widget-convert-button 'link b e :mime-handle handle @@ -7711,22 +7716,28 @@ (aref gnus-down-mouse-3 0)))))) (defun gnus-mime-display-security (handle) - (save-restriction - (narrow-to-region (point) (point)) - (unless (gnus-unbuttonized-mime-type-p (car handle)) - (gnus-insert-mime-security-button handle)) - (gnus-mime-display-part (cadr handle)) - (unless (bolp) - (insert "\n")) - (unless (gnus-unbuttonized-mime-type-p (car handle)) - (let ((gnus-mime-security-button-line-format - gnus-mime-security-button-end-line-format)) - (gnus-insert-mime-security-button handle))) - (mm-set-handle-multipart-parameter - handle 'gnus-region - (cons (set-marker (make-marker) (point-min)) - (set-marker (make-marker) (point-max)))))) - + (let ((gnus-buttonized-mime-types + ;; when this function is called, the signature has been verified, + ;; so we might as well display the button. + (if (or (eq mm-verify-option 'always) (eq mm-verify-option 'known)) + (append '("multipart/signed") gnus-buttonized-mime-types) + gnus-buttonized-mime-types))) + (save-restriction + (narrow-to-region (point) (point)) + (unless (gnus-unbuttonized-mime-type-p (car handle)) + (gnus-insert-mime-security-button handle)) + (gnus-mime-display-part (cadr handle)) + (unless (bolp) + (insert "\n")) + (unless (gnus-unbuttonized-mime-type-p (car handle)) + (let ((gnus-mime-security-button-line-format + gnus-mime-security-button-end-line-format)) + (gnus-insert-mime-security-button handle))) + (mm-set-handle-multipart-parameter + handle 'gnus-region + (cons (set-marker (make-marker) (point-min)) + (set-marker (make-marker) (point-max))))))) + (defun gnus-mime-security-run-function (function) "Run FUNCTION with the security part under point." (gnus-article-check-buffer)