[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsi
From: |
Lars Ingebrigtsen |
Subject: |
bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) |
Date: |
Sun, 06 Sep 2020 17:02:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy),
Lars Ingebrigtsen <=
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Drew Adams, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Michael Heerdegen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Michael Heerdegen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Michael Heerdegen, 2020/09/06
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/09/06