emacs-devel
[Top][All Lists]
Advanced

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

question about narrowed behavior of next-property-change et al.


From: Miles Bader
Subject: question about narrowed behavior of next-property-change et al.
Date: 23 Jan 2003 17:50:15 +0900

Info contains the following check to avoid refontifying fontified nodes:

   (defun Info-fontify-node ()
     ;; Only fontify the node if it hasn't already been done.
     (unless (next-property-change (point-min))
        ...

However, this often doesn't always work properly because it assumes that
`next-property-change' will return nil if there's no property change
before the narrowed end of the buffer, and in fact if there's a
property change _beyond_ the narrowed end, it will return (point-max),
even though the user passed a LIMIT arg of nil.

It's easy enough to change Info-fontify-node to be more paranoid, but to
me, the current behavior of `next-property-change' seems wrong in this
case -- I think if there's no property change before (point-max), and
the user passed LIMIT == nil, then it should return nil, regardless of
whether (point-max) is due to narrowing or not.

Any comments before I make such a change?

-Miles
-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]




reply via email to

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