Subject: bug#1222: overlay display inherits face properties from buffer

From: Glenn Morris <[email-masked]>
Date: Tue, 21 Oct 2008 20:57:56 -0400

Package: emacs
Version: 23.0.60
Severity: minor

This bug is extracted from #1176, which contained several issues.

The display property of an overlay inherits face properties from the
following buffer text. The workaround is to fully specify the face
properties of the display text.

Example:

(let ((buff (generate-new-buffer "overlay test"))
      o)
  (with-current-buffer buff
    (insert (propertize "text" 'face '(:background "red")))
    (setq o (make-overlay (point-min) (point-max)))
    (overlay-put o 'display "display")
;;;    (overlay-put o 'display (propertize "display" 'face 'default))
    (pop-to-buffer buff)))

"display" has a red background. The commented out part shows the
workaround.