summaryrefslogtreecommitdiff
path: root/lisp/ansi-color.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-10-12 10:18:10 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2017-10-12 10:18:10 -0400
commit7ed1c0483830c9d985685ebfe43b7157e8f49fc9 (patch)
tree68e656cf8bf5d646ae40fe19055e1c34df3167ad /lisp/ansi-color.el
parent7dc037e39e6bbfa8964d0040e8141dbcf70d726d (diff)
downloademacs-7ed1c0483830c9d985685ebfe43b7157e8f49fc9.tar.gz
* lisp/ansi-color.el (ansi-color-make-extent): Let overlays evaporate.
Diffstat (limited to 'lisp/ansi-color.el')
-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:
:group 'ansi-colors
:version "23.2")
-(defvar ansi-color-apply-face-function 'ansi-color-apply-overlay-face
+(defvar ansi-color-apply-face-function #'ansi-color-apply-overlay-face
"Function for applying an Ansi Color face to text in a buffer.
This function should accept three arguments: BEG, END, and FACE,
and it should apply face FACE to the text between BEG and END.")
@@ -480,6 +480,7 @@ Emacs requires OBJECT to be a buffer."
;; In order to avoid this, we use the `insert-behind-hooks' overlay
;; property to make sure it works.
(let ((overlay (make-overlay from to object)))
+ (overlay-put overlay 'evaporate t)
(overlay-put overlay 'modification-hooks '(ansi-color-freeze-overlay))
(overlay-put overlay 'insert-behind-hooks '(ansi-color-freeze-overlay))
overlay)))