bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46243: [External] : Re: bug#46243: 26.3; If invoke menu item that re


From: Drew Adams
Subject: bug#46243: [External] : Re: bug#46243: 26.3; If invoke menu item that reads a char, get keystrokes echo
Date: Mon, 1 Feb 2021 22:30:54 +0000

> > If I have a menu item that reads a character, the
> > prompt for that read is not seen; the menu selection
> > key sequence gets echoed instead.  This shouldn't
> > happen (should it?).
> 
> I think it should, but I couldn't verify that, because
> your recipes didn't work for me.  Please provide a
> recipe that would work in "emacs -Q".

emacs -Q            ; e.g. Emacs 27.1

(defun diredp-mark-with-char (char &optional arg)
  "Mark this line with CHAR.
With numeric prefix arg N, mark the next N lines."
  (interactive
   (progn (message nil)
          (list (read-char "Mark this line with char: ")
                (prefix-numeric-value current-prefix-arg))))
  (let ((dired-marker-char  char))
    (dired-mark arg)))

(define-key dired-mode-map [menu-bar mark with-char]
  '(menu-item
     "Mark This with Char..." diredp-mark-with-char
     :help "Mark this line with a character you type"))

Now try the same thing but with (message nil) commented out.

With (message nil), you see the prompt:

   Mark this line with char:

Without (message nil), you see only this:

   menu-bar mark with-char-

The command works OK, but a user will have no clue
about typing a char.

Clear enough?  The change was introduced in Emacs 24,
AFAICT.  Regression or improvement?  Am I missing
something?

(You can forget about easy-menu for this bug report,
at least for now, please.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]