unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: make-field suggestion
Date: 31 Aug 2004 11:39:48 -0400	[thread overview]
Message-ID: <m1zn4bpbh1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <psn00bs6x5.fsf@diannao.ittc.ku.edu>

> (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))

The only place where I've use fields is for minibuffer-like entry things
with completion (where I reuse the minibuffer completion code, suitably
fixed not to assume it's in a minibuffer).  In such cases, it's often
important that if the user reduces the size of the field to 0 it can still
grow it back later on by inserting text into it, i.e. I've had to use an
overlay and it had to be created as:

   (make-overlay from to nil nil t)

so I suggest to at least make it possible to pass the front/rear stickiness
as an argument.


        Stefan

  reply	other threads:[~2004-08-31 15:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 14:45 make-field suggestion Jerry James
2004-08-31 15:39 ` Stefan [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1zn4bpbh1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).