emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32474: closed (27.0.50; Gnus doesn't highlight ref


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32474: closed (27.0.50; Gnus doesn't highlight refined changes in diff attachments)
Date: Thu, 30 Aug 2018 22:18:02 +0000

Your message dated Fri, 31 Aug 2018 01:17:14 +0300
with message-id <address@hidden>
and subject line Re: bug#32474: 27.0.50; Gnus doesn't highlight refined changes 
in diff attachments
has caused the debbugs.gnu.org bug report #32474,
regarding 27.0.50; Gnus doesn't highlight refined changes in diff attachments
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32474: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32474
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; Gnus doesn't highlight refined changes in diff attachments Date: Mon, 20 Aug 2018 00:20:02 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
Since refined changes in diff attachments are highlighted using overlays,
they need special treatment to be copied together with text properties:

diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 50a927bce2..0b15f6b188 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -452,7 +452,7 @@ mm-display-inline-fontify
   "Insert HANDLE inline fontifying with MODE.
 If MODE is not set, try to find mode automatically."
   (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset))
-       text coding-system)
+       text coding-system ovs)
     (unless (eq charset 'gnus-decoded)
       (mm-with-unibyte-buffer
        (mm-insert-part handle)
@@ -498,10 +498,18 @@ mm-display-inline-fontify
                      (eq major-mode 'fundamental-mode))
            (font-lock-ensure))))
       (setq text (buffer-string))
+      (when (eq mode 'diff-mode)
+       (setq ovs (mapcar (lambda (ov) (list ov (overlay-start ov)
+                                               (overlay-end ov)))
+                         (overlays-in (point-min) (point-max)))))
       ;; Set buffer unmodified to avoid confirmation when killing the
       ;; buffer.
       (set-buffer-modified-p nil))
-    (mm-insert-inline handle text)))
+    (let ((b (1- (point))))
+      (mm-insert-inline handle text)
+      (dolist (ov ovs)
+       (move-overlay (nth 0 ov) (+ (nth 1 ov) b)
+                                (+ (nth 2 ov) b) (current-buffer))))))
 
 ;; Shouldn't these functions check whether the user even wants to use
 ;; font-lock?  Also, it would be nice to change for the size of the

--- End Message ---
--- Begin Message --- Subject: Re: bug#32474: 27.0.50; Gnus doesn't highlight refined changes in diff attachments Date: Fri, 31 Aug 2018 01:17:14 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
> Since refined changes in diff attachments are highlighted using overlays,
> they need special treatment to be copied together with text properties:

Done in eb5588db69.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]