diff options
| author | Katsumi Yamaoka | 2014-05-01 07:59:33 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2014-05-01 07:59:33 +0000 |
| commit | 077222e0f05f45bb93e6398e2c4e4b1a1206318e (patch) | |
| tree | 3212f21f2d13332c65ba0fdf60c2d3b759c8914b | |
| parent | 724ee6dc80839fa04bb4e6d064d8be872d490f23 (diff) | |
| download | emacs-077222e0f05f45bb93e6398e2c4e4b1a1206318e.tar.gz emacs-077222e0f05f45bb93e6398e2c4e4b1a1206318e.zip | |
lisp/gnus/gnus-art.el (gnus-mm-display-part): Highlight header attachment buttons
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 26 |
2 files changed, 24 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7d880016ad7..628ccf3b272 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-05-01 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-mm-display-part): | ||
| 4 | Highlight header attachment buttons. | ||
| 5 | |||
| 1 | 2014-04-30 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2014-04-30 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 7 | ||
| 3 | * gnus-art.el (gnus-mm-display-part): Don't move point while toggling | 8 | * gnus-art.el (gnus-mm-display-part): Don't move point while toggling |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 951ee908a54..44777f461e9 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -5673,15 +5673,27 @@ all parts." | |||
| 5673 | (mm-handle-media-type handle)))))) | 5673 | (mm-handle-media-type handle)))))) |
| 5674 | (goto-char point) | 5674 | (goto-char point) |
| 5675 | ;; Toggle the button appearance between `[button]...' and `[button]'. | 5675 | ;; Toggle the button appearance between `[button]...' and `[button]'. |
| 5676 | (let ((end (next-single-property-change point 'gnus-data))) | 5676 | (let ((end (next-single-property-change point 'gnus-data)) |
| 5677 | (delete-region (previous-single-property-change end 'gnus-data) end)) | 5677 | start) |
| 5678 | (gnus-insert-mime-button | 5678 | (delete-region |
| 5679 | handle id (list (mm-handle-displayed-p handle))) | 5679 | (setq start (previous-single-property-change end 'gnus-data)) |
| 5680 | (let ((pt (point))) | 5680 | end) |
| 5681 | (gnus-insert-mime-button | ||
| 5682 | handle id (list (mm-handle-displayed-p handle))) | ||
| 5683 | (setq end (point)) | ||
| 5681 | (if (search-backward "\n\n" nil t) | 5684 | (if (search-backward "\n\n" nil t) |
| 5682 | (goto-char pt) | 5685 | (goto-char end) |
| 5683 | ;; We're in the article header. | 5686 | ;; We're in the article header. |
| 5684 | (delete-char -1))) | 5687 | (delete-char -1) |
| 5688 | (dolist (ovl (gnus-overlays-in start (1- end))) | ||
| 5689 | (gnus-overlay-put ovl 'gnus-button-attachment-extra t) | ||
| 5690 | (gnus-overlay-put ovl 'face nil)) | ||
| 5691 | (save-restriction | ||
| 5692 | (message-narrow-to-field) | ||
| 5693 | (let ((gnus-treatment-function-alist | ||
| 5694 | '((gnus-treat-highlight-headers | ||
| 5695 | gnus-article-highlight-headers)))) | ||
| 5696 | (gnus-treat-article 'head))))) | ||
| 5685 | (goto-char point) | 5697 | (goto-char point) |
| 5686 | (if (window-live-p window) | 5698 | (if (window-live-p window) |
| 5687 | (select-window window))) | 5699 | (select-window window))) |