Julian Bradfield writes:
>Does VM really sometimes insert and sometimes
insert-before-markers at
>the same place?
This is how summary update is done:
if start and end are the markers for the start and end of the summary
line for the current message, it does (schematically):
(goto-char end)
(insert-before-markers "z")
(goto-char start)
(delete-region start (1- end))
(insert updated-summary-text)
(delete-char 1)
Erm, but translated to XEmacs and using an extent `e' instead of two
markers, that's just
;; at initialization of the extent
;; for this to work the extent must not include the newlines
(set-extent-property e 'end-open nil)
(set-extent-property e 'start-open nil)
;; on each update:
(let ((start (extent-start-position e))
(end (extent-end-position e)))
(goto-char start)
(delete-region start end)
(insert updated-summary-text))
There are other ways to accomplish the same end with different
settings of extent closure (but they require inserting first, then
deleting).
The requirement that the newlines be outside of the extents is a bit
delicate, but the dance around the markers is a bit ugly, I think.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta