[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: |
Juri Linkov |
Subject: |
bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) |
Date: |
Tue, 25 Aug 2020 21:23:46 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> However, there's things like:
>
> (setq from-coding (read-coding-system
> (format "Recode filename %s from (default %s): "
> filename default-coding)
> default-coding))
>
> These are surprisingly rare, but, uhm... perhaps format-prompt could
> take a format string? The function would then look like:
>
> (defun format-prompt (prompt default &rest format-args)
> )
>
> where it would call `format' on PROMPT and FORMAT-ARGS.
>
> So that would then be:
>
> (setq from-coding (read-coding-system
> (format-prompt "Recode filename %s"
> default-coding filename)
> default-coding))
Simpler would be to format arguments separately:
(setq from-coding (read-coding-system
(format-prompt (format "Recode filename %s from"
filename)
default-coding)
default-coding))
that would allow easier replacement of 'format' with 'gettext' later:
(setq from-coding (read-coding-system
(format-prompt (gettext "Recode filename %s from"
filename)
default-coding)
default-coding))
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Stefan Kangas, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Stefan Monnier, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Drew Adams, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Stefan Kangas, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy),
Juri Linkov <=
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Stefan Monnier, 2020/08/25
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/26
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Juri Linkov, 2020/08/27
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/28
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Stefan Monnier, 2020/08/28
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/30
- bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy), Lars Ingebrigtsen, 2020/08/28