all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Miles Bader'" <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: by default, point should not enter the minibuffer prompt
Date: Thu, 9 Oct 2008 09:03:02 -0700	[thread overview]
Message-ID: <00e001c92a28$824de050$c2b22382@us.oracle.com> (raw)
In-Reply-To: <87skr639df.fsf@catnip.gol.com>

> > When is `minibuffer-prompt-properties' examined? Is it too 
> > late once the minibuffer is activated and a minibuffer key is hit?
> 
> It is used when generating the prompt.

So I guess it's useless to modify it on the fly after the minibuffer is entered,
e.g. in `minibuffer-setup-hook', or after a minibuffer key is hit. Too bad.

> I would suggest you make your new command a wrapper around the normal
> command; that way you can take advantage of any special handling it
> does.
> 
> (defun move-bol-or-prev-bol (&optional arg)
>   (interactive "p")
>   (let ((orig-point (point)))
>     (move-beginning-of-line arg)
>     (when (= (point) orig-point)
>       (goto-char (line-beginning-position 0)))))

OK, thanks for the suggestion.
FWIW, I'm using this, which works for all Emacs versions:

(defun icicle-beginning-of-line+ (&optional n)
  (interactive
   (list (if current-prefix-arg
             (prefix-numeric-value current-prefix-arg)
           0)))
  (unless n (setq n  0))
  (if (and (eq this-command last-command)
           (not current-prefix-arg))
      (forward-line -1)
    (forward-line (- n)))
  (when (bobp)
    (goto-char (if (fboundp 'minibuffer-prompt-end)
                   (minibuffer-prompt-end)
                 (point-min)))))






  reply	other threads:[~2008-10-09 16:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08  0:34 by default, point should not enter the minibuffer prompt Drew Adams
2008-10-08  1:59 ` Stefan Monnier
2008-10-08  2:07 ` Miles Bader
2008-10-08  6:08   ` Drew Adams
2008-10-08  8:08     ` Miles Bader
2008-10-08 15:13       ` Drew Adams
2008-10-08 16:24         ` Miles Bader
2008-10-08 16:52           ` Drew Adams
2008-10-08 16:34         ` Drew Adams
2008-10-09  0:22           ` Miles Bader
2008-10-09 16:03             ` Drew Adams [this message]
2008-10-08 20:22 ` Richard M. Stallman

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='00e001c92a28$824de050$c2b22382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@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 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.