[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: by default, point should not enter the minibuffer prompt
From: |
Drew Adams |
Subject: |
RE: by default, point should not enter the minibuffer prompt |
Date: |
Thu, 9 Oct 2008 09:03:02 -0700 |
> > 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)))))
- by default, point should not enter the minibuffer prompt, Drew Adams, 2008/10/07
- Re: by default, point should not enter the minibuffer prompt, Stefan Monnier, 2008/10/07
- Re: by default, point should not enter the minibuffer prompt, Miles Bader, 2008/10/07
- RE: by default, point should not enter the minibuffer prompt, Drew Adams, 2008/10/08
- Re: by default, point should not enter the minibuffer prompt, Miles Bader, 2008/10/08
- RE: by default, point should not enter the minibuffer prompt, Drew Adams, 2008/10/08
- Re: by default, point should not enter the minibuffer prompt, Miles Bader, 2008/10/08
- RE: by default, point should not enter the minibuffer prompt, Drew Adams, 2008/10/08
- RE: by default, point should not enter the minibuffer prompt, Drew Adams, 2008/10/08
- Re: by default, point should not enter the minibuffer prompt, Miles Bader, 2008/10/08
- RE: by default, point should not enter the minibuffer prompt,
Drew Adams <=
Re: by default, point should not enter the minibuffer prompt, Richard M. Stallman, 2008/10/08