((mm-handle-undisplayer handle)
(mm-remove-part handle)))
(goto-char start)
+ (unless (bolp)
+ ;; This is a header button.
+ (forward-line 1))
(mm-display-inline handle))
;; Toggle the button appearance between `[button]...' and `[button]'.
(goto-char btn)
(point-max)))
(dolist (annot annots)
(set-extent-endpoints annot (point) (point)))))
- (unless (or displayed-p (eolp))
- ;; Add extra newline.
- (insert (propertize (buffer-substring (1- (point)) (point))
- 'gnus-undeletable t))))
- (unless (search-backward "\n\n" nil t)
- ;; We're in the article header.
- (delete-char -1)
- (dolist (ovl (gnus-overlays-in btn (point)))
- (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))))
+ (setq start (point))
+ (if (search-backward "\n\n" nil t)
+ (progn
+ (goto-char start)
+ (unless (or displayed-p (eolp))
+ ;; Add extra newline.
+ (insert (propertize (buffer-substring (1- start) start)
+ 'gnus-undeletable t))))
+ ;; We're in the article header.
+ (delete-char -1)
+ (dolist (ovl (gnus-overlays-in btn (point)))
+ (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 b))))
(defun gnus-mime-set-charset-parameters (handle charset)
(unless (zerop (buffer-size))
(buffer-string))))))
(goto-char start)
+ (unless (bolp)
+ ;; This is a header button.
+ (forward-line 1))
(cond ((stringp part)
(save-restriction
(narrow-to-region (point)
(point-max)))
(dolist (annot annots)
(set-extent-endpoints annot (point) (point)))))
- (unless (or displayed-p (eolp))
- ;; Add extra newline.
- (insert (propertize (buffer-substring (1- (point)) (point))
- 'gnus-undeletable t))))
- (unless (search-backward "\n\n" nil t)
- ;; We're in the article header.
- (delete-char -1)
- (dolist (ovl (gnus-overlays-in point (point)))
- (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))))
+ (setq start (point))
+ (if (search-backward "\n\n" nil t)
+ (progn
+ (goto-char start)
+ (unless (or displayed-p (eolp))
+ ;; Add extra newline.
+ (insert (propertize (buffer-substring (1- start) start)
+ 'gnus-undeletable t))))
+ ;; We're in the article header.
+ (delete-char -1)
+ (dolist (ovl (gnus-overlays-in point (point)))
+ (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)))