unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).
@ 2019-10-15 19:07 Alan Mackenzie
  2019-10-17  3:00 ` Lars Ingebrigtsen
  2019-10-17  9:17 ` Andreas Schwab
  0 siblings, 2 replies; 13+ messages in thread
From: Alan Mackenzie @ 2019-10-15 19:07 UTC (permalink / raw)
  To: 37769

Hello, Emacs

On the master branch, global-set-key calls read-key-sequence, but wrongly
fails to set the DONT-DOWNCASE-LAST argument.  The doc-string for
read-key-sequence rightly notes "A non-nil value is appropriate for
reading a key sequence to be defined.".

As a consequence, it is impossible to use M-x global-set-key to bind
S-tab on a tty where local-function-key-map converts S-tab to [33554441]
= 2^25 + 9.

The fix is easy:

diff --git a/lisp/subr.el b/lisp/subr.el
index 1a4a2e8b81..f3371dd2d7 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1120,7 +1120,7 @@ global-set-key
 that you make with this function."
   (interactive
    (let* ((menu-prompting nil)
-          (key (read-key-sequence "Set key globally: ")))
+          (key (read-key-sequence "Set key globally: " nil t)))
      (list key
            (read-command (format "Set key %s to command: "
                                  (key-description key))))))

This fix should also be safe, since it is only in the interactive spec
part of the function, and thus can only affect interactive use.

Any objections to me installing this fix on the master branch?

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-10-19 18:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15 19:07 bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab) Alan Mackenzie
2019-10-17  3:00 ` Lars Ingebrigtsen
2019-10-17  8:16   ` Eli Zaretskii
2019-10-17 15:58   ` Alan Mackenzie
2019-10-18  3:09     ` Lars Ingebrigtsen
2019-10-18  7:11       ` Eli Zaretskii
2019-10-19  8:02         ` Lars Ingebrigtsen
2019-10-19  8:53           ` Andreas Schwab
2019-10-19  9:03             ` Lars Ingebrigtsen
2019-10-19  9:36           ` Eli Zaretskii
2019-10-19 18:26             ` Alan Mackenzie
2019-10-17  9:17 ` Andreas Schwab
2019-10-17 16:00   ` Alan Mackenzie

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).