[Top][All Lists]

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

Re: indentation via text or overlay property?

From: Kevin Rodgers
Subject: Re: indentation via text or overlay property?
Date: Mon, 09 Jun 2003 15:56:34 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Stefan Monnier wrote:

(let ((lbp (line-beginning-position)))
  (overlay-put (make-overlay lbp lbp)
               'display '(space :align-to 4)))

Does it work with text-properties ?  How about with a non-empty overlay ?
It's a part of the code that hasn't seen much use yet, so there might
be bugs.

Yes, it works with non-empty overlays, and with a text property assigned to the

first character on the line.  But the empty overlay case seems to be a bug.

(let ((lbp (line-beginning-position)))
  (overlay-put (make-overlay lbp lbp)
               'string-before (make-string 4 ? )))

The `string-before' should be `before-string' and it should work
because it's been around (and used) for a long time.

Doh!  I think that's the best solution for my problem.

Thanks for your help,
<a href="mailto:&lt;kevin.rodgers&#64;;";>Kevin Rodgers</a>

reply via email to

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