From 278b7c1b52be11e8c49b8252953e8e84d45765c3 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 19 Oct 2019 18:21:25 +0000 Subject: [PATCH] Don't downcase the key binding in global-set-key. This fixes bug #37769. * lisp/subr.el (global-set-key): Provide a non-nil DONT-DOWNCASE argument to read-key-sequence. * etc/NEWS: Add an entry for this change. --- etc/NEWS | 5 +++++ lisp/subr.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 5794af5b601..fd46360ed23 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -461,6 +461,11 @@ RGB triplets with a single hexadecimal digit per component. Note that this key binding will not work on MS-Windows systems if 'w32-scroll-lock-modifier' is non-nil. +--- +** 'global-set-key', called interactively, now no longer downcases a +key binding with an upper case letter - if you can type it, you can +bind it. + * Editing Changes in Emacs 27.1 diff --git a/lisp/subr.el b/lisp/subr.el index 1a4a2e8b81b..f3371dd2d74 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1120,7 +1120,7 @@ that local binding will continue to shadow any global binding 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)))))) -- 2.39.2