all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Juri Linkov <juri@linkov.net>
Cc: 50935@debbugs.gnu.org
Subject: bug#50935: minibuffer-electric-default-mode interface
Date: Tue, 5 Oct 2021 12:55:52 -0400	[thread overview]
Message-ID: <CADwFkmnUAZuVLf9gyH5iNKTEPKCkKyHSEc7hPD8XX7UgcnOyhQ@mail.gmail.com> (raw)
In-Reply-To: <87bl44bto2.fsf@mail.linkov.net>

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

tags 50935 + patch
thanks

Juri Linkov <juri@linkov.net> writes:

>> A third option is to add 'minibuffer-default-prompt-format' on emacs-28,
>> but make the suggested deletion on master -- which give us more time to
>> get `minibuffer-default-prompt-format' up to scrap.
>
> I guess the answer depends on the question how many prompts
> are already converted to 'minibuffer-default-prompt-format',
> and how many remain.  I checked a few commands, and noticed
> only one command that doesn't use the new format.  It's 'M-.'
> ('xref-find-definitions').  But maybe it can't use the new option
> 'minibuffer-default-prompt-format' because xref.el should be
> available in old versions?  Still it could use
>
>   (if (boundp 'minibuffer-default-prompt-format) ...

I've now updated any prompt I could find to use `format-prompt' (by
grepping for " (default ").  Maybe I've missed one or two, but that
should mean that that the overwhelming majority of our prompts now
respect `minibuffer-default-prompt-format'.  See commit 6640942221.

With that, I think the option `minibuffer-eldef-shorten-default' should
be declared obsolete, as in the attached patch, and consequently removed
from the manual.  This change should go to master, of course.

The command `minibuffer-electric-default-mode' shouldn't be declared
obsolete as it does something different.

[-- Attachment #2: 0001-Make-minibuffer-eldef-shorten-default-obsolete.patch --]
[-- Type: text/x-diff, Size: 2543 bytes --]

From 2aa7838e263f8645b1142554a8df164210b35989 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Tue, 5 Oct 2021 18:37:30 +0200
Subject: [PATCH] Make minibuffer-eldef-shorten-default obsolete

* lisp/minibuf-eldef.el (minibuffer-eldef-shorten-default): Make
variable obsolete in favor of 'minibuffer-default-prompt-format'.
* doc/emacs/mini.texi (Basic Minibuffer): Delete above obsolete
variable.
---
 doc/emacs/mini.texi   | 8 ++------
 etc/NEWS              | 6 ++++++
 lisp/minibuf-eldef.el | 2 ++
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index b0f6e424a7..d764352998 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -58,12 +58,8 @@ Basic Minibuffer
 Emacs hides the default argument as soon as you modify the contents of
 the minibuffer (since typing @key{RET} would no longer submit that
 default).  If you ever bring back the original minibuffer text, the
-prompt again shows the default.  Furthermore, if you change the
-variable @code{minibuffer-eldef-shorten-default} to a non-@code{nil}
-value, the default argument is displayed as @samp{[@var{default-arg}]}
-instead of @samp{(default @var{default-arg})}, saving some screen
-space.  To enable this minor mode, type @kbd{M-x
-minibuffer-electric-default-mode}.
+prompt again shows the default.  To enable this minor mode, type
+@kbd{M-x minibuffer-electric-default-mode}.
 
   Since the minibuffer appears in the echo area, it can conflict with
 other uses of the echo area.  If an error message or an informative
diff --git a/etc/NEWS b/etc/NEWS
index e9fcfba425..79cca4b4ef 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -98,6 +98,12 @@ also handle ANSI codes for faint, italic and blinking text, displaying
 it with new 'ansi-term-faint/italic/slow-blinking/fast-blinking'
 faces.
 
+** Miscellaneous
+
++++
+*** User option 'minibuffer-eldef-shorten-default' is now obsolete.
+Customize the user option 'minibuffer-default-prompt-format' instead.
+
 \f
 * New Modes and Packages in Emacs 29.1
 
diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el
index f67ec353c8..c1a4443057 100644
--- a/lisp/minibuf-eldef.el
+++ b/lisp/minibuf-eldef.el
@@ -64,6 +64,8 @@ minibuffer-eldef-shorten-default
   :type 'boolean
   :group 'minibuffer
   :version "24.3")
+(make-obsolete-variable 'minibuffer-eldef-shorten-default
+                        'minibuffer-default-prompt-format "29.1")
 
 (defvar minibuffer-default-in-prompt-regexps
   (minibuffer-default--in-prompt-regexps)
-- 
2.30.2


  reply	other threads:[~2021-10-05 16:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 11:43 bug#50935: minibuffer-electric-default-mode interface Stefan Kangas
2021-10-02 19:15 ` Juri Linkov
2021-10-02 23:14   ` Stefan Kangas
2021-10-03 16:54     ` Juri Linkov
2021-10-04  2:17       ` Stefan Kangas
2021-10-04 17:22         ` Juri Linkov
2021-10-05 16:55           ` Stefan Kangas [this message]
2022-09-02 12:51             ` Lars Ingebrigtsen
2021-10-05  6:43         ` Juri Linkov
2021-10-05 14:11           ` Stefan Kangas
2021-10-05 15:52             ` Eli Zaretskii
2021-10-05 16:46               ` Juri Linkov
2021-10-05 16:42             ` Juri Linkov
2021-10-03 11:51   ` Eli Zaretskii

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=CADwFkmnUAZuVLf9gyH5iNKTEPKCkKyHSEc7hPD8XX7UgcnOyhQ@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=50935@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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.