unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "T.V Raman" <raman@google.com>,  emacs-devel@gnu.org
Subject: Re: Request: Please add a prompt to read-event
Date: Tue, 21 Dec 2021 10:17:54 -0500	[thread overview]
Message-ID: <jwvilvi6lan.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87o85exsyv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 18 Dec 2021 08:39:04 +0100")

Lars Ingebrigtsen [2021-12-18 08:39:04] wrote:

> "T.V Raman" <raman@google.com> writes:
>
>> Emacspeak advices read-event and read-char to speak their
>> prompt. There are a few places in Emacs where read-event and/or
>> read-char  are called without a prompt; e.g. disabled-command-function
>>
>> Could we perhaps fix this?
>
> [...]
>
>>      (message "Type y, n, ! or SPC (the space bar): ")
>>      (let ((cursor-in-echo-area t))
>>        (while (progn (setq char (read-event))
>> 		     (or (not (numberp char))
>> 			 (not (memq (downcase char)
>> 				    '(?! ?y ?n ?\s ?\C-g)))))
>> 	 (ding)
>> 	 (message "Please type y, n, ! or SPC (the space bar): "))))
>
> Hm...  that is pretty odd.  Why is it using `message' here instead of
> just using that string as the prompt to `read-event'?

This code dates back to 1989.  It would benefit from a bit of
modernization, such as making it use `read-multiple-choice`.


        Stefan




  parent reply	other threads:[~2021-12-21 15:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 16:30 Request: Please add a prompt to read-event T.V Raman
2021-12-18  7:39 ` Lars Ingebrigtsen
2021-12-19 14:46   ` T.V Raman
2021-12-21 15:17   ` Stefan Monnier [this message]
2021-12-21 17:18     ` T.V Raman
2021-12-22 12:36     ` Lars Ingebrigtsen
2021-12-22 15:08       ` T.V Raman
2021-12-26 16:22     ` Stefan Kangas
     [not found]       ` <p91v8zbi8fh.fsf@google.com>
     [not found]         ` <CAOySe-69oVWDEFjyvA=quJwj78PrwRPmCgALn=Ofr_OGtmAOsQ@mail.gmail.com>
2021-12-26 20:58           ` Stefan Kangas
2021-12-27 12:09             ` Lars Ingebrigtsen
2021-12-27 15:00               ` Eli Zaretskii
2021-12-27 14:45             ` T.V Raman
2021-12-19  5:00 ` Richard Stallman

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=jwvilvi6lan.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=raman@google.com \
    /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).