aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/mm-view.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 50a927bce23..15eac11fb9e 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -452,7 +452,7 @@
452 "Insert HANDLE inline fontifying with MODE. 452 "Insert HANDLE inline fontifying with MODE.
453If MODE is not set, try to find mode automatically." 453If MODE is not set, try to find mode automatically."
454 (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset)) 454 (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset))
455 text coding-system) 455 text coding-system ovs)
456 (unless (eq charset 'gnus-decoded) 456 (unless (eq charset 'gnus-decoded)
457 (mm-with-unibyte-buffer 457 (mm-with-unibyte-buffer
458 (mm-insert-part handle) 458 (mm-insert-part handle)
@@ -498,10 +498,18 @@ If MODE is not set, try to find mode automatically."
498 (eq major-mode 'fundamental-mode)) 498 (eq major-mode 'fundamental-mode))
499 (font-lock-ensure)))) 499 (font-lock-ensure))))
500 (setq text (buffer-string)) 500 (setq text (buffer-string))
501 (when (eq mode 'diff-mode)
502 (setq ovs (mapcar (lambda (ov) (list ov (overlay-start ov)
503 (overlay-end ov)))
504 (overlays-in (point-min) (point-max)))))
501 ;; Set buffer unmodified to avoid confirmation when killing the 505 ;; Set buffer unmodified to avoid confirmation when killing the
502 ;; buffer. 506 ;; buffer.
503 (set-buffer-modified-p nil)) 507 (set-buffer-modified-p nil))
504 (mm-insert-inline handle text))) 508 (let ((b (1- (point))))
509 (mm-insert-inline handle text)
510 (dolist (ov ovs)
511 (move-overlay (nth 0 ov) (+ (nth 1 ov) b)
512 (+ (nth 2 ov) b) (current-buffer))))))
505 513
506;; Shouldn't these functions check whether the user even wants to use 514;; Shouldn't these functions check whether the user even wants to use
507;; font-lock? Also, it would be nice to change for the size of the 515;; font-lock? Also, it would be nice to change for the size of the