GNU bug report logs -
#12443
24.2.50; Default values in the minibuffer prompt (fix
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Fri, 14 Sep 2012 14:08:01 UTC
Severity: minor
Found in version 24.2.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
OK, the first sweep has now landed on master (I basically grepped for
" (default %" and then did the changes. Boy, were there many different
ways to "optionally add some defaults" in the code...
78 files changed, 316 insertions(+), 453 deletions(-)
Look at all the lines saved! :-)
There's also some of the prompting functions that have some support for
this general idea, but in different ways:
(defun read-regexp (prompt &optional defaults history)
[...]
(input (read-from-minibuffer
(cond ((string-match-p ":[ \t]*\\'" prompt)
prompt)
((and default (> (length default) 0))
(format "%s (default %s): " prompt
(query-replace-descr default)))
(t
(format "%s: " prompt)))
nil nil nil (or history 'regexp-history) suggestions t)))
and
(defun read-input-method-name (prompt &optional default inhibit-null)
[...]
(if default
(setq prompt (format prompt default)))
Hm. I had some further notes in here, but... I put them in a buffer I
didn't save.
*sigh*
I should go have lunch. I mean dinner.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.