From: Jerry James <james@xemacs.org>
Subject: make-field suggestion
Date: Tue, 31 Aug 2004 09:45:10 -0500 [thread overview]
Message-ID: <psn00bs6x5.fsf@diannao.ittc.ku.edu> (raw)
I have been porting the Emacs field interface to XEmacs. I ran into a
small hassle when I discovered that the default front/back-stickiness of
XEmacs extents is reversed from that of Emacs overlays. In order to
hide the differences, I wrote a make-field function that makes an
extent, then reverses the stickiness (open/closedness, in XEmacs
terminology) to match Emacs.
I would like to suggest the make-field interface for Emacs. The Emacs
version would look something like this, if defaulting to text properties
is okay:
(defun make-field (from to value &optional buffer)
"Make a field with value VALUE over the range [FROM, TO) in BUFFER.
BUFFER defaults to the current buffer."
(with-current-buffer (or buffer (current-buffer))
(put-text-property from to 'field value)))
If you would rather default to overlays, then perhaps something along
these lines would be suitable:
(defun make-field (from to value &optional buffer)
"Make a field with value VALUE over the range [FROM, TO) in BUFFER.
BUFFER defaults to the current buffer."
(overlay-put (make-overlay from to buffer) 'field value))
Regards,
--
Jerry James
http://www.ittc.ku.edu/~james/
next reply other threads:[~2004-08-31 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 14:45 Jerry James [this message]
2004-08-31 15:39 ` make-field suggestion Stefan
2004-09-01 2:42 ` Jerry James
2004-09-01 2:48 ` Stefan
2004-09-07 15:28 ` Jerry James
2004-09-07 15:56 ` Stefan
2004-09-07 19:46 ` Jerry James
2004-09-01 4:57 ` Richard Stallman
2004-09-07 15:32 ` Jerry James
2004-09-08 1:25 ` Miles Bader
2004-09-08 22:26 ` Jerry James
2004-09-08 22:41 ` Stefan
2004-09-08 22:44 ` Miles Bader
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=psn00bs6x5.fsf@diannao.ittc.ku.edu \
--to=james@xemacs.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.