unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 40dcf9c2ab 4/5: read-multiple-choice: Display "SPC" instead of " "
Date: Sun, 26 Dec 2021 12:41:34 -0800	[thread overview]
Message-ID: <CADwFkmkt1ate=8N-5c=+oXMgNuTXWE8kT=z1jfyptkmtdJmvEA@mail.gmail.com> (raw)
In-Reply-To: <83a6gnns3d.fsf@gnu.org>

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

Eli Zaretskii <eliz@gnu.org> writes:

> Why not allow read-multiple-choice to specify longer strings?  It
> already does, with "yes" and "no", doesn't it?

Yup, so I added "(the space bar)".

> I think having the keys/responses in a special face, even if it's
> without the underline, should be enough.  The face should provide
> alternatives for the underline, such as distinct colors.

I think you're right about the brackets.  See the attached patch, WDYT?

[-- Attachment #2: rmc-prompt.diff --]
[-- Type: text/x-diff, Size: 1365 bytes --]

diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 522d395eba..9d5fe40f9a 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -38,10 +38,10 @@ rmc--add-key-description
            ;; Not in the name string, or a special character.
            ((or (not pos)
                 (member desc '("ESC" "TAB" "RET" "DEL" "SPC")))
-            (format "[%s] %s"
+            (format "%s %s"
                     (if graphical-terminal
                         (propertize desc 'face 'read-multiple-choice-face)
-                      desc)
+                      (propertize desc 'face 'help-key-name))
                     name))
            ;; The prompt character is in the name, so highlight
            ;; it on graphical terminals.
diff --git a/lisp/novice.el b/lisp/novice.el
index 0cf54df160..d48b1109d0 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -88,7 +88,7 @@ disabled-command-function
                                      '((?y "yes")
                                        (?n "no")
                                        (?! "yes; enable for session")
-                                       (?\s "yes; once"))
+                                       (?\s "(the space bar) yes; once"))
                                      help-string
                                      "*Disabled Command*"))))
     (pcase char

  reply	other threads:[~2021-12-26 20:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 16:32 master 40dcf9c2ab 4/5: read-multiple-choice: Display "SPC" instead of " " Eli Zaretskii
2021-12-26 17:09 ` Stefan Kangas
2021-12-26 18:23   ` Eli Zaretskii
2021-12-26 20:41     ` Stefan Kangas [this message]
2021-12-27 17:56       ` Eli Zaretskii
2021-12-27 19:50         ` Stefan Kangas

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmkt1ate=8N-5c=+oXMgNuTXWE8kT=z1jfyptkmtdJmvEA@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).