aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-10-12 10:18:10 -0400
committerStefan Monnier2017-10-12 10:18:10 -0400
commit7ed1c0483830c9d985685ebfe43b7157e8f49fc9 (patch)
tree68e656cf8bf5d646ae40fe19055e1c34df3167ad
parent7dc037e39e6bbfa8964d0040e8141dbcf70d726d (diff)
downloademacs-7ed1c0483830c9d985685ebfe43b7157e8f49fc9.tar.gz
emacs-7ed1c0483830c9d985685ebfe43b7157e8f49fc9.zip
* lisp/ansi-color.el (ansi-color-make-extent): Let overlays evaporate.
-rw-r--r--lisp/ansi-color.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index 34e1daebb01..71b79223429 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -182,7 +182,7 @@ in shell buffers. You set this variable by calling one of:
182 :group 'ansi-colors 182 :group 'ansi-colors
183 :version "23.2") 183 :version "23.2")
184 184
185(defvar ansi-color-apply-face-function 'ansi-color-apply-overlay-face 185(defvar ansi-color-apply-face-function #'ansi-color-apply-overlay-face
186 "Function for applying an Ansi Color face to text in a buffer. 186 "Function for applying an Ansi Color face to text in a buffer.
187This function should accept three arguments: BEG, END, and FACE, 187This function should accept three arguments: BEG, END, and FACE,
188and it should apply face FACE to the text between BEG and END.") 188and it should apply face FACE to the text between BEG and END.")
@@ -480,6 +480,7 @@ Emacs requires OBJECT to be a buffer."
480 ;; In order to avoid this, we use the `insert-behind-hooks' overlay 480 ;; In order to avoid this, we use the `insert-behind-hooks' overlay
481 ;; property to make sure it works. 481 ;; property to make sure it works.
482 (let ((overlay (make-overlay from to object))) 482 (let ((overlay (make-overlay from to object)))
483 (overlay-put overlay 'evaporate t)
483 (overlay-put overlay 'modification-hooks '(ansi-color-freeze-overlay)) 484 (overlay-put overlay 'modification-hooks '(ansi-color-freeze-overlay))
484 (overlay-put overlay 'insert-behind-hooks '(ansi-color-freeze-overlay)) 485 (overlay-put overlay 'insert-behind-hooks '(ansi-color-freeze-overlay))
485 overlay))) 486 overlay)))