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

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

bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).


From: Alan Mackenzie
Subject: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab).
Date: Tue, 15 Oct 2019 19:07:26 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

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





reply via email to

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