From: steve@miranova.com (Steven L. Baur)
Subject: add-text-properties -vs- set-extent-property (XEmacs)
Date: 19 Nov 1995 20:53:30 -0800 [thread overview]
Message-ID: <m2ka4vq439.fsf@diana.miranova.com> (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
reply other threads:[~1995-11-20 4:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ka4vq439.fsf@diana.miranova.com \
--to=steve@miranova.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).