[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: Fri, 06 Jun 2003 12:09:22 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Stefan Monnier wrote:

Cool!  But since those spaces are displayed instead of the original text
(not in addition to it), I don't see how to use that to
implement indentation.

You might want to put that property on an overlay (of size 0), then.

Good idea, especially because I want to avoid modifying the buffer.  But I'm
having problems getting overlays of size 0 to work.  Trying things out manually
with M-:, I've only gotten the desired effect once.  I'm trying things like:

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

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

Thanks for the pointers.  Is the correct way to test for this feature:
        (>= emacs-major-version 21)

I think (featurep 'text-properties 'display) is better.

| Debugger entered--Lisp error: (wrong-number-of-arguments #<subr featurep> 2)

<a href="mailto:&lt;kevin.rodgers&#64;;";>Kevin Rodgers</a>

reply via email to

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