lisp/gnus/gnus-art.el (gnus-mm-display-part): Highlight header attachment buttons
This commit is contained in:
parent
724ee6dc80
commit
077222e0f0
2 changed files with 24 additions and 7 deletions
|
@ -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>
|
||||
|
||||
* gnus-art.el (gnus-mm-display-part): Don't move point while toggling
|
||||
|
|
|
@ -5673,15 +5673,27 @@ all parts."
|
|||
(mm-handle-media-type handle))))))
|
||||
(goto-char point)
|
||||
;; Toggle the button appearance between `[button]...' and `[button]'.
|
||||
(let ((end (next-single-property-change point 'gnus-data)))
|
||||
(delete-region (previous-single-property-change end 'gnus-data) end))
|
||||
(gnus-insert-mime-button
|
||||
handle id (list (mm-handle-displayed-p handle)))
|
||||
(let ((pt (point)))
|
||||
(let ((end (next-single-property-change point 'gnus-data))
|
||||
start)
|
||||
(delete-region
|
||||
(setq start (previous-single-property-change end 'gnus-data))
|
||||
end)
|
||||
(gnus-insert-mime-button
|
||||
handle id (list (mm-handle-displayed-p handle)))
|
||||
(setq end (point))
|
||||
(if (search-backward "\n\n" nil t)
|
||||
(goto-char pt)
|
||||
(goto-char end)
|
||||
;; 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)
|
||||
(if (window-live-p window)
|
||||
(select-window window)))
|
||||
|
|
Loading…
Add table
Reference in a new issue