diff options
| author | Katsumi Yamaoka | 2014-05-15 23:31:30 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2014-05-15 23:31:30 +0000 |
| commit | 24367e6cfd924f7efe70be6964c881976537faac (patch) | |
| tree | aa4a943f5dd3f4443868dfe4e85243446967bc4a | |
| parent | fc51d3e2014cc93f9e19c170b840f9f17d5bb1a6 (diff) | |
| download | emacs-24367e6cfd924f7efe70be6964c881976537faac.tar.gz emacs-24367e6cfd924f7efe70be6964c881976537faac.zip | |
lisp/gnus/gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Fix last change
| -rw-r--r-- | lisp/gnus/gnus-art.el | 76 |
1 files changed, 44 insertions, 32 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7924d911a4d..c9ceb2eeef5 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -5346,6 +5346,9 @@ Compressed files like .gz and .bz2 are decompressed." | |||
| 5346 | ((mm-handle-undisplayer handle) | 5346 | ((mm-handle-undisplayer handle) |
| 5347 | (mm-remove-part handle))) | 5347 | (mm-remove-part handle))) |
| 5348 | (goto-char start) | 5348 | (goto-char start) |
| 5349 | (unless (bolp) | ||
| 5350 | ;; This is a header button. | ||
| 5351 | (forward-line 1)) | ||
| 5349 | (mm-display-inline handle)) | 5352 | (mm-display-inline handle)) |
| 5350 | ;; Toggle the button appearance between `[button]...' and `[button]'. | 5353 | ;; Toggle the button appearance between `[button]...' and `[button]'. |
| 5351 | (goto-char btn) | 5354 | (goto-char btn) |
| @@ -5364,22 +5367,25 @@ Compressed files like .gz and .bz2 are decompressed." | |||
| 5364 | (point-max))) | 5367 | (point-max))) |
| 5365 | (dolist (annot annots) | 5368 | (dolist (annot annots) |
| 5366 | (set-extent-endpoints annot (point) (point))))) | 5369 | (set-extent-endpoints annot (point) (point))))) |
| 5367 | (unless (or displayed-p (eolp)) | 5370 | (setq start (point)) |
| 5368 | ;; Add extra newline. | 5371 | (if (search-backward "\n\n" nil t) |
| 5369 | (insert (propertize (buffer-substring (1- (point)) (point)) | 5372 | (progn |
| 5370 | 'gnus-undeletable t)))) | 5373 | (goto-char start) |
| 5371 | (unless (search-backward "\n\n" nil t) | 5374 | (unless (or displayed-p (eolp)) |
| 5372 | ;; We're in the article header. | 5375 | ;; Add extra newline. |
| 5373 | (delete-char -1) | 5376 | (insert (propertize (buffer-substring (1- start) start) |
| 5374 | (dolist (ovl (gnus-overlays-in btn (point))) | 5377 | 'gnus-undeletable t)))) |
| 5375 | (gnus-overlay-put ovl 'gnus-button-attachment-extra t) | 5378 | ;; We're in the article header. |
| 5376 | (gnus-overlay-put ovl 'face nil)) | 5379 | (delete-char -1) |
| 5377 | (save-restriction | 5380 | (dolist (ovl (gnus-overlays-in btn (point))) |
| 5378 | (message-narrow-to-field) | 5381 | (gnus-overlay-put ovl 'gnus-button-attachment-extra t) |
| 5379 | (let ((gnus-treatment-function-alist | 5382 | (gnus-overlay-put ovl 'face nil)) |
| 5380 | '((gnus-treat-highlight-headers | 5383 | (save-restriction |
| 5381 | gnus-article-highlight-headers)))) | 5384 | (message-narrow-to-field) |
| 5382 | (gnus-treat-article 'head)))) | 5385 | (let ((gnus-treatment-function-alist |
| 5386 | '((gnus-treat-highlight-headers | ||
| 5387 | gnus-article-highlight-headers)))) | ||
| 5388 | (gnus-treat-article 'head))))) | ||
| 5383 | (goto-char b)))) | 5389 | (goto-char b)))) |
| 5384 | 5390 | ||
| 5385 | (defun gnus-mime-set-charset-parameters (handle charset) | 5391 | (defun gnus-mime-set-charset-parameters (handle charset) |
| @@ -5712,6 +5718,9 @@ all parts." | |||
| 5712 | (unless (zerop (buffer-size)) | 5718 | (unless (zerop (buffer-size)) |
| 5713 | (buffer-string)))))) | 5719 | (buffer-string)))))) |
| 5714 | (goto-char start) | 5720 | (goto-char start) |
| 5721 | (unless (bolp) | ||
| 5722 | ;; This is a header button. | ||
| 5723 | (forward-line 1)) | ||
| 5715 | (cond ((stringp part) | 5724 | (cond ((stringp part) |
| 5716 | (save-restriction | 5725 | (save-restriction |
| 5717 | (narrow-to-region (point) | 5726 | (narrow-to-region (point) |
| @@ -5746,22 +5755,25 @@ all parts." | |||
| 5746 | (point-max))) | 5755 | (point-max))) |
| 5747 | (dolist (annot annots) | 5756 | (dolist (annot annots) |
| 5748 | (set-extent-endpoints annot (point) (point))))) | 5757 | (set-extent-endpoints annot (point) (point))))) |
| 5749 | (unless (or displayed-p (eolp)) | 5758 | (setq start (point)) |
| 5750 | ;; Add extra newline. | 5759 | (if (search-backward "\n\n" nil t) |
| 5751 | (insert (propertize (buffer-substring (1- (point)) (point)) | 5760 | (progn |
| 5752 | 'gnus-undeletable t)))) | 5761 | (goto-char start) |
| 5753 | (unless (search-backward "\n\n" nil t) | 5762 | (unless (or displayed-p (eolp)) |
| 5754 | ;; We're in the article header. | 5763 | ;; Add extra newline. |
| 5755 | (delete-char -1) | 5764 | (insert (propertize (buffer-substring (1- start) start) |
| 5756 | (dolist (ovl (gnus-overlays-in point (point))) | 5765 | 'gnus-undeletable t)))) |
| 5757 | (gnus-overlay-put ovl 'gnus-button-attachment-extra t) | 5766 | ;; We're in the article header. |
| 5758 | (gnus-overlay-put ovl 'face nil)) | 5767 | (delete-char -1) |
| 5759 | (save-restriction | 5768 | (dolist (ovl (gnus-overlays-in point (point))) |
| 5760 | (message-narrow-to-field) | 5769 | (gnus-overlay-put ovl 'gnus-button-attachment-extra t) |
| 5761 | (let ((gnus-treatment-function-alist | 5770 | (gnus-overlay-put ovl 'face nil)) |
| 5762 | '((gnus-treat-highlight-headers | 5771 | (save-restriction |
| 5763 | gnus-article-highlight-headers)))) | 5772 | (message-narrow-to-field) |
| 5764 | (gnus-treat-article 'head)))) | 5773 | (let ((gnus-treatment-function-alist |
| 5774 | '((gnus-treat-highlight-headers | ||
| 5775 | gnus-article-highlight-headers)))) | ||
| 5776 | (gnus-treat-article 'head))))) | ||
| 5765 | (goto-char point) | 5777 | (goto-char point) |
| 5766 | (if (window-live-p window) | 5778 | (if (window-live-p window) |
| 5767 | (select-window window))) | 5779 | (select-window window))) |