emacs-devel
[Top][All Lists]
Advanced

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

Re: before-string property has no effect if display property is empty st


From: Joe Wells
Subject: Re: before-string property has no effect if display property is empty string
Date: Wed, 19 Sep 2007 17:07:34 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     The documentation leads me to believe that the before-string and
>     display properties of an overlay should be orthogonal.  However, the
>     before-string is not displayed if the display property is the empty
>     string.
>
> I think the thing to do is document this.

This is not clear.  For example, linum.el makes empty overlays with
before-string properties and no display property at all.  And this
works.  So why shouldn't it work when there is a display property that
is the empty string?

> Does the same happen for the after-string?

It works fine with after-string.  The following expression displays
“AXXXC” (correctly):

  (let ((buf (get-buffer-create "foo")))
    (with-current-buffer buf
      (display-buffer buf)
      (erase-buffer)
      (dolist (o (overlays-in (point-min) (point-max)))
        (delete-overlay o))
      (insert "ABC")
      (let ((o (make-overlay 2 3))
            (s (make-string 3 ?X)))
        (overlay-put o 'display "")
        (overlay-put o 'after-string s))))

Given that it works with after-string, this is evidence for
interpreting the behavior with before-string as a bug.

-- 
Joe




reply via email to

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