emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111935: lisp/gnus/shr.el: Make all t


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111935: lisp/gnus/shr.el: Make all the overlays set the `evaporate' property so that they're removed properly
Date: Mon, 04 Mar 2013 10:27:33 +0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111935
author: Ted Phelps <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2013-03-04 10:27:33 +0000
message:
  lisp/gnus/shr.el: Make all the overlays set the `evaporate' property so that 
they're removed properly
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2013-02-25 22:47:31 +0000
+++ b/lisp/gnus/ChangeLog       2013-03-04 10:27:33 +0000
@@ -1,3 +1,8 @@
+2013-03-03  Ted Phelps  <address@hidden>
+
+       * shr.el: Make all the overlays set the `evaporate' property so that
+       they're removed properly.
+
 2013-02-25  Adam Sjøgren  <address@hidden>
 
        * mml2015-el (mml2015-epg-key-image): Wrap epg-gpg-program in

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2013-02-17 00:38:03 +0000
+++ b/lisp/gnus/shr.el  2013-03-04 10:27:33 +0000
@@ -520,6 +520,11 @@
     (dolist (type types)
       (shr-add-font (or shr-start (point)) (point) type))))
 
+(defun shr-make-overlay (beg end &optional buffer front-advance rear-advance)
+  (let ((overlay (make-overlay beg end buffer front-advance rear-advance)))
+    (overlay-put overlay 'evaporate t)
+    overlay))
+
 ;; Add an overlay in the region, but avoid putting the font properties
 ;; on blank text at the start of the line, and the newline at the end,
 ;; to avoid ugliness.
@@ -529,7 +534,7 @@
     (while (< (point) end)
       (when (bolp)
        (skip-chars-forward " "))
-      (let ((overlay (make-overlay (point) (min (line-end-position) end))))
+      (let ((overlay (shr-make-overlay (point) (min (line-end-position) end))))
        (overlay-put overlay 'face type))
       (if (< (line-end-position) end)
          (forward-line 1)
@@ -790,7 +795,7 @@
        (when (and (< (setq column (current-column)) width)
                   (< (setq column (shr-previous-newline-padding-width column))
                      width))
-         (let ((overlay (make-overlay (point) (1+ (point)))))
+         (let ((overlay (shr-make-overlay (point) (1+ (point)))))
            (overlay-put overlay 'before-string
                         (concat
                          (mapconcat
@@ -1238,8 +1243,8 @@
            (end-of-line)
            (insert line shr-table-vertical-line)
            (dolist (overlay overlay-line)
-             (let ((o (make-overlay (- (point) (nth 0 overlay) 1)
-                                    (- (point) (nth 1 overlay) 1)))
+             (let ((o (shr-make-overlay (- (point) (nth 0 overlay) 1)
+                                        (- (point) (nth 1 overlay) 1)))
                    (properties (nth 2 overlay)))
                (while properties
                  (overlay-put o (pop properties) (pop properties)))))
@@ -1340,8 +1345,8 @@
              (let ((end (length (car cache))))
                (dolist (overlay (cadr cache))
                  (let ((new-overlay
-                        (make-overlay (1+ (- end (nth 0 overlay)))
-                                      (1+ (- end (nth 1 overlay)))))
+                        (shr-make-overlay (1+ (- end (nth 0 overlay)))
+                                          (1+ (- end (nth 1 overlay)))))
                        (properties (nth 2 overlay)))
                    (while properties
                      (overlay-put new-overlay


reply via email to

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