1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00

lisp/gnus/gnus-art.el (gnus-mm-display-part): Highlight header attachment buttons

This commit is contained in:
Katsumi Yamaoka 2014-05-01 07:59:33 +00:00
parent 724ee6dc80
commit 077222e0f0
2 changed files with 24 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2014-05-01 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mm-display-part):
Highlight header attachment buttons.
2014-04-30 Katsumi Yamaoka <yamaoka@jpl.org> 2014-04-30 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mm-display-part): Don't move point while toggling * gnus-art.el (gnus-mm-display-part): Don't move point while toggling

View file

@ -5673,15 +5673,27 @@ all parts."
(mm-handle-media-type handle)))))) (mm-handle-media-type handle))))))
(goto-char point) (goto-char point)
;; Toggle the button appearance between `[button]...' and `[button]'. ;; Toggle the button appearance between `[button]...' and `[button]'.
(let ((end (next-single-property-change point 'gnus-data))) (let ((end (next-single-property-change point 'gnus-data))
(delete-region (previous-single-property-change end 'gnus-data) end)) start)
(gnus-insert-mime-button (delete-region
handle id (list (mm-handle-displayed-p handle))) (setq start (previous-single-property-change end 'gnus-data))
(let ((pt (point))) end)
(gnus-insert-mime-button
handle id (list (mm-handle-displayed-p handle)))
(setq end (point))
(if (search-backward "\n\n" nil t) (if (search-backward "\n\n" nil t)
(goto-char pt) (goto-char end)
;; We're in the article header. ;; We're in the article header.
(delete-char -1))) (delete-char -1)
(dolist (ovl (gnus-overlays-in start (1- end)))
(gnus-overlay-put ovl 'gnus-button-attachment-extra t)
(gnus-overlay-put ovl 'face nil))
(save-restriction
(message-narrow-to-field)
(let ((gnus-treatment-function-alist
'((gnus-treat-highlight-headers
gnus-article-highlight-headers))))
(gnus-treat-article 'head)))))
(goto-char point) (goto-char point)
(if (window-live-p window) (if (window-live-p window)
(select-window window))) (select-window window)))