Stephen,
> 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.
oh well, that's where we differ. It seems odd to me that the glyph-carrier's
glyph's visibility is determined by whether then endpoint is the same as an
enclosing invisible extent (rather than just being determined by the already
defined extent ordering).
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
I will test with that.
(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.
I've not thought about such glyphs, and have no opinion on how they should be
rendered.
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 sounds plausible.
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.
Certainly. I'll write something up.
Thanks for your comments.
nathan
--
Nathan Sidwell ::
http://www.codesourcery.com :: CodeSourcery
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches