bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#15312: Info (point-entered, point-left): Doc incomplete, hence incor


From: Stefan Monnier
Subject: bug#15312: Info (point-entered, point-left): Doc incomplete, hence incorrect
Date: Fri, 13 Sep 2013 12:28:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Sorry, I'm still in the dark.  Does the code presented in
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15312#11 work correctly
> and as expected, or does it not?

AFAICT, yes, it works fine.  The problem is one of documentation.

>> Clearly, this disagrees with:
>> ,----  (info "(elisp) Not Intervals")
>> | "What are the properties of this character?"  So we have decided these
>> | are the only questions that make sense; we have not implemented asking
>> | questions about where intervals start or end.
>> `----
>> And actually the above text is incorrect/incomplete in the sense that
>> next-single-property-change clearly implements a functionality that lets
>> you "ask questions about where intervals start or end".
> Actually, it doesn't disagree, if you keep in mind what RMS meant when
> he wrote that text (intervals can and do overlap, while runs of text
> properties cannot).

Right.  But it just goes to show that the situation is more subtle.
We should describe it more fully.

> But IMO that is a completely different issue.

IMO it is this exact issue.

Jambunathan wrote:
>    (mapc
>     (lambda (s)
>       (insert (propertize s  'mouse-face font-lock-comment-face)))
>     '("ab" "cd"))

you mean
     
    (dolist (s '("ab" "cd"))
      (insert (propertize s  'mouse-face font-lock-comment-face)))

> The intention of the programmer in the above case MAY have been to treat
> "ab" and "cd" differently.  
> But the way Emacs deals with them, it considers "abcd" as a single
> stretch and they are highlighted together.

Yes, exactly.  If you want them to appear separate you need to arrange
for the value to be non-eq, e.g.:

    (dolist (s '("ab" "cd"))
      (insert (propertize s  'mouse-face (list font-lock-comment-face))))


-- Stefan





reply via email to

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