[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linum.el: problem (bug ?) fix and improvement
From: |
Stefan Monnier |
Subject: |
Re: linum.el: problem (bug ?) fix and improvement |
Date: |
Thu, 12 May 2011 16:43:55 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> What we'd like here is for the redisplay to ignore the margin property
>> placed on invisible text.
> Are you sure? Only part of a line could be invisible, in which case
> it won't be easy to explain why we drop the before-string on the
> floor. I would be uneasy to make such radical changes on behalf of a
> single use case.
Good point, but that's easy to fix: put the overlay over the whole line
of text rather than one the empty string at its beginning.
>> This boils down to making Emacs ignore
>> `before-string' properties placed at the beginning of invisible text.
>> I don't think it's always right to ignore them, tho.
> There's explicit code to do it the way we do now:
> /* If there are before-strings at the start of invisible
> text, and the text is invisible because of a text
> property, arrange to show before-strings because 20.x did
> it that way. (If the text is invisible because of an
> overlay property instead of a text property, this is
> already handled in the overlay code.) */
> if (NILP (overlay)
> && get_overlay_strings (it, it->stop_charpos))
> {
> handled = HANDLED_RECOMPUTE_PROPS;
it-> stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p;
> }
> Just undoing this would be regression from Emacs 20.x.
I know. That's why I mention that maybe we should pay attention to the
stickiness so as to allow the Elisp code to choose which behavior
is desired.
Stefan