From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#37769: global-set-key wrongly downcases the typed key (e.g. S-tab). Date: Tue, 15 Oct 2019 19:07:26 +0000 Message-ID: <20191015190726.GA6315@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="126542"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: 37769@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 15 21:08:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKSB0-000Wo8-JV for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 21:08:10 +0200 Original-Received: from localhost ([::1]:56612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSAz-0007Sb-Go for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 15:08:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36677) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSAt-0007Q1-Qb for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:08:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKSAs-0003rZ-Rv for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKSAs-0003rP-OV for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKSAs-0004Bk-He for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2019 19:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37769 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157116646116065 (code B ref -1); Tue, 15 Oct 2019 19:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Oct 2019 19:07:41 +0000 Original-Received: from localhost ([127.0.0.1]:44852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKSAV-0004B1-M8 for submit@debbugs.gnu.org; Tue, 15 Oct 2019 15:07:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKSAT-0004At-AT for submit@debbugs.gnu.org; Tue, 15 Oct 2019 15:07:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36588) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKSAR-0007PB-Ff for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:07:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKSAP-0003ad-EI for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:07:35 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43145 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1iKSAP-0003YR-03 for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 15:07:33 -0400 Original-Received: (qmail 18411 invoked by uid 3782); 15 Oct 2019 19:07:28 -0000 Original-Received: from acm.muc.de (p4FE15D60.dip0.t-ipconnect.de [79.225.93.96]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 15 Oct 2019 21:07:27 +0200 Original-Received: (qmail 6414 invoked by uid 1000); 15 Oct 2019 19:07:26 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169391 Archived-At: 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).