]> git.eshelyaron.com Git - emacs.git/commitdiff
* subr.el (text-clone-maintain): Fix clone overlay deletion
authorChong Yidong <cyd@gnu.org>
Fri, 7 Dec 2012 16:25:28 +0000 (00:25 +0800)
committerChong Yidong <cyd@gnu.org>
Fri, 7 Dec 2012 16:25:28 +0000 (00:25 +0800)
when a syntax is specified.

Fixes: debbugs:13025
lisp/ChangeLog
lisp/subr.el

index ee55187957751b498df395f0ae24644e25ff8a00..ab351f2a69c34c747e7d878e58f4d038b03a7687 100644 (file)
@@ -1,5 +1,8 @@
 2012-12-07  Chong Yidong  <cyd@gnu.org>
 
+       * subr.el (text-clone-maintain): Fix clone overlay deletion when a
+       syntax is specified (Bug#13025).
+
        * info.el (Info-set-mode-line): Remove the file extension from
        Info-current-file if there is one (Bug#13016).
 
index edc2927d6734004f1b7a324b5e2b279cf1024d34..e08277370a9593e3ec5fec33e40039b523279783 100644 (file)
@@ -3847,7 +3847,7 @@ This is used on the `modification-hooks' property of text clones."
                (if (not (re-search-forward
                          (overlay-get ol1 'text-clone-syntax) cend t))
                    ;; Mark the overlay for deletion.
-                   (overlay-put ol1 'text-clones nil)
+                   (setq end cbeg)
                  (when (< (match-end 0) cend)
                    ;; Shrink the clone at its end.
                    (setq end (min end (match-end 0)))