From: Stephan Stahl <stahl@eos.franken.de>
Subject: Default value in previous-matching-history-element
Date: 29 May 2004 03:13:37 +0200 [thread overview]
Message-ID: <87k6yw827y.fsf@eos.franken.de> (raw)
In-Reply-To: <44068.217.194.34.123.1085657656.squirrel@wwws.franken.de>
Hi.
-----
I'm sorry. I have sent a message about this without a subject so i
suppose no one read the first one.. I have changed the patch a little
bit since the time.
-----
Since i learned that M-n while doing completing-read and friends
brings up the default value and lets you edit it, i used that feature
very often.
However it does not work in previous-matching-history-element (M-r
while the minibuffer is active). The following very simple patch
will do the trick..
Maybe someone wants to include that in emacs.
*** simple.1.645.el Sat May 29 02:47:35 2004
--- simple.new.el Sat May 29 02:47:15 2004
***************
*** 949,963 ****
See also `minibuffer-history-case-insensitive-variables'."
(interactive
(let* ((enable-recursive-minibuffers t)
(regexp (read-from-minibuffer "Previous element matching (regexp): "
nil
minibuffer-local-map
nil
! 'minibuffer-history-search-history)))
;; Use the last regexp specified, by default, if input is empty.
(list (if (string= regexp "")
(if minibuffer-history-search-history
! (car minibuffer-history-search-history)
(error "No previous history search regexp"))
regexp)
(prefix-numeric-value current-prefix-arg))))
--- 949,965 ----
See also `minibuffer-history-case-insensitive-variables'."
(interactive
(let* ((enable-recursive-minibuffers t)
+ (default (car minibuffer-history-search-history))
(regexp (read-from-minibuffer "Previous element matching (regexp): "
nil
minibuffer-local-map
nil
! 'minibuffer-history-search-history
! default)))
;; Use the last regexp specified, by default, if input is empty.
(list (if (string= regexp "")
(if minibuffer-history-search-history
! default
(error "No previous history search regexp"))
regexp)
(prefix-numeric-value current-prefix-arg))))
--
Stephan Stahl
next parent reply other threads:[~2004-05-29 1:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <44068.217.194.34.123.1085657656.squirrel@wwws.franken.de>
2004-05-29 1:13 ` Stephan Stahl [this message]
2004-05-30 14:31 ` Default value in previous-matching-history-element Richard Stallman
2004-05-30 20:25 ` Juri Linkov
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=87k6yw827y.fsf@eos.franken.de \
--to=stahl@eos.franken.de \
/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.