From: Katsumi Yamaoka Date: Wed, 11 Sep 2019 02:41:34 +0000 (+0000) Subject: Create a new overlay used to mark Attachment header (bug#37370) X-Git-Tag: emacs-27.0.90~1551^2~101 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4b9f9324a87388ceb7ce1359feb5686efcb2523e;p=emacs.git Create a new overlay used to mark Attachment header (bug#37370) * lisp/gnus/gnus-art.el (gnus-mime-inline-part) (gnus-mm-display-part, gnus-mime-buttonize-attachments-in-header): Create a new overlay used to mark Attachment header instead of using existing overlays. --- diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 04cb087737f..eba66c1c3aa 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5378,9 +5378,9 @@ Compressed files like .gz and .bz2 are decompressed." 'gnus-undeletable t)))) ;; We're in the article header. (delete-char -1) - (dolist (ovl (overlays-in btn (point))) + (let ((ovl (make-overlay btn (point)))) (overlay-put ovl 'gnus-button-attachment-extra t) - (overlay-put ovl 'face nil)) + (overlay-put ovl 'evaporate t)) (save-restriction (message-narrow-to-field) (let ((gnus-treatment-function-alist @@ -5763,9 +5763,9 @@ all parts." 'gnus-undeletable t)))) ;; We're in the article header. (delete-char -1) - (dolist (ovl (overlays-in point (point))) + (let ((ovl (make-overlay point (point)))) (overlay-put ovl 'gnus-button-attachment-extra t) - (overlay-put ovl 'face nil)) + (overlay-put ovl 'evaporate t)) (save-restriction (message-narrow-to-field) (let ((gnus-treatment-function-alist @@ -6379,9 +6379,9 @@ in the body. Use `gnus-header-face-alist' to highlight buttons." (insert "\n") (end-of-line))) (insert "\n") - (dolist (ovl (overlays-in (point-min) (point))) + (let ((ovl (make-overlay (point-min) (point)))) (overlay-put ovl 'gnus-button-attachment-extra t) - (overlay-put ovl 'face nil)) + (overlay-put ovl 'evaporate t)) (let ((gnus-treatment-function-alist '((gnus-treat-highlight-headers gnus-article-highlight-headers))))