GNU bug report logs - #47286
28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt'

Previous Next

Package: emacs;

Reported by: Gabriel <gabriel376 <at> hotmail.com>

Date: Sat, 20 Mar 2021 22:24:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 28.0.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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Gabriel <gabriel376 <at> hotmail.com>, 47286 <at> debbugs.gnu.org
Subject: bug#47286: 28.0.50; [PATCH] Replace "(default %s)" with 'format-prompt'
Date: Sun, 21 Mar 2021 20:57:04 +0200
On 21.03.2021 20:31, Gabriel wrote:
> Thanks for pointing it out. I just searched for the current source tree
> of master branch for ocurrences of "(default %s)", so I am not sure if I
> changed some package that shouldn't be update. If so, I will promptly
> update the patch.
> 
> Perhaps project.el could use a similar fallback that exists on
> cperl-mode.el (commit 3a95f4fc12df0a570ad413e099a22bf901b7346d):
> 
> ;; Available in Emacs 28: format-prompt
> (defalias 'cperl--format-prompt
>    (if (fboundp 'format-prompt) 'format-prompt
>      (lambda (msg default)
>        (if default (format "%s (default %s): " msg default)
>          (concat msg ": ")))))

Sounds reasonable to me.

Also note that project--completing-read-strict includes as (string-equal 
default "") check added in 2be537e64.

Perhaps format-prompt could use it as well.




This bug report was last modified 4 years and 63 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.