* add-text-properties -vs- set-extent-property (XEmacs)
@ 1995-11-20 4:53 Steven L. Baur
0 siblings, 0 replies; only message in thread
From: Steven L. Baur @ 1995-11-20 4:53 UTC (permalink / raw)
The compatibility problem is this, when XEmacs puts properties on text
the properties get propagated when text is inserted at the front.
This causes various kinds of wierdness in gnus-topic (my patch of
yesterday will still break due to this), and also pseudo articles in
the *Summary* buffer (off the top of my head).
Here is a short illustration:
;;; This example follows existing Gnus practice
;;; Both strings get inserted with properties attached to the first string
(defun test-text-properties ()
(interactive)
(let ((beg (point)))
(save-excursion
(insert "This is a test.\n")
(add-text-properties beg (point) (list 'start-open t
'face 'italic
'start-closed nil
'steve-property "Emacs Rules"))))
(insert "This is some more text.\n"))
;;; This example is non-portable to GNU Emacs, but works
(defun test-text-properties-2 ()
(interactive)
(let ((beg (point))
extent)
(save-excursion
(insert "This is a test.\n")
(setq extent (make-extent beg (point)))
(set-extent-property extent 'start-open t)
(set-extent-property extent 'steve-property "Emacs Rules!")
(set-extent-property extent 'face 'italic)))
(insert "This is some more text, should be excluded from previous.\n"))
--
steve@miranova.com baur
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-11-20 4:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-20 4:53 add-text-properties -vs- set-extent-property (XEmacs) Steven L. Baur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).