Nathan Sidwell writes:
Namely that glyphs just inside invisible extents are rendered
(rather than being invisible).
But that seems like correct behavior to me, since glyphs attached to
an extent are outside the extent. The definition of an extent's
"invisible" property refers to visibility of the text, which
presumably means the buffer contents. Definition of what should
happen in the case of extents which happen to share an endpoint is
very unclear to me. Personally, I would interpret those glyphs as
being outside of both extents, the glyph-carrier and the extent that
contains the glyph-carrier.
That said, I'm inclined to apply the patch provided
(1) it doesn't break other applications (the important one I can think
of is preview-latex), and
(2) it is understood that behavior may change in the future.
Why might behavior change? Note that "outside" can mean *way*
outside. I don't think I want the glyph to disappear in the
following:
;; make a visible mark in the left margin
(set-specifier left-margin-width 2 (current-buffer))
(set-extent-properties (make-extent (point) (point))
`(begin-glyph '(make-glyph ">")
begin-glyph-layout 'outside-margin))
;; hide the text containing the mark, but not the mark
(set-extent-properties (make-extent (1- (point)) (1+ (point)))
'(invisible t))
This currently doesn't work, but I've always considered that a bug.
Note that I think that reasonable behavior would be if invisibility of
containing extents applied to glyphs with 'text layout, but not
'whitespace, 'inside-margin, or 'outside-margin.
This comment in create_string_text_block(redisplay.c) is telling :)
Yeah, what it tells is that nobody has really thought this stuff
through.
Built and tested on an i686 ubuntu system. Do you
need anything more?
I'd really like a spec of what should happen in the various cases
where extents share endpoints and the glyph's layout is 'text.
Without a spec to work to, I can easily see someone coming up with an
application that doesn't work as desired wanting to change it again.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches