From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: hugo@heagren.com Newsgroups: gmane.emacs.bugs Subject: bug#72460: [patch] add commands for setting keyboard translations interactively Date: Thu, 03 Oct 2024 03:45:02 +0100 Message-ID: <57d837226be0ce82a6340658b1297445@heagren.com> References: <86bk0qit2b.fsf@gnu.org> <86o7486u3z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_81e85bd4b66b3956f797dbc2453ab6f1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25771"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.6.8 Cc: 72460@debbugs.gnu.org, Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 03 04:46:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1swBrG-0006W1-Ui for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Oct 2024 04:46:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swBr2-0001UZ-Uc; Wed, 02 Oct 2024 22:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swBqr-0001U5-Tv for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2024 22:46:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swBqr-0004F7-CG for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2024 22:46:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:MIME-Version:To:Subject; bh=dEv/pehFHoWWzItNgGMNIRmncj2OfGjclL0r/7ea39g=; b=VTH0KuMlzCGdBovSXxAOBH7lQk+Mukcwv62Xp+KKvYssaKvSzqbZ2tB5iynqDZ+jRm2n1y2mtKqUzO7drP9XC5bNrAPI6C6hCytcuQ4pOZaS7S8eiF31CE7r0KYkGPpmxtEkEWq1ueJ3LrEN4hISHNSTgMiubPPd5U7dWZZX+NGWJ82yI/1YDK8kfSCLRi8cnazQJ6Miv5+N6Vi/xhGMc08+Vwfo1A0M0IDdMZCOLfUgOJHiuqBSNOPc0ynZ9/OLi8VSO5byPLOvJsyUdXQc2sggzuImAH+q1H37Un7qBIaQ2q9HCmNWkmKH0iFOgfeK6MxNadOQFtMKjzE46tQLog==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swBqs-0002Mh-GE for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2024 22:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: hugo@heagren.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Oct 2024 02:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72460 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72460-submit@debbugs.gnu.org id=B72460.17279235409058 (code B ref 72460); Thu, 03 Oct 2024 02:46:02 +0000 Original-Received: (at 72460) by debbugs.gnu.org; 3 Oct 2024 02:45:40 +0000 Original-Received: from localhost ([127.0.0.1]:59572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swBqV-0002M1-Ak for submit@debbugs.gnu.org; Wed, 02 Oct 2024 22:45:39 -0400 Original-Received: from whuk14.whukhost.com ([5.77.41.174]:52084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swBqS-0002Ll-U7 for 72460@debbugs.gnu.org; Wed, 02 Oct 2024 22:45:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=heagren.com ; s=default; h=Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To: From:Date:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dEv/pehFHoWWzItNgGMNIRmncj2OfGjclL0r/7ea39g=; b=bJbRmrLeJPVtFzrV19SkGd/+Gx 7hyOfsAXPukjNMzGtGUqbOgMxLBraSMwMbl+vYJ0ExzQRfKgajS8uRwX8KMoZMSZufTpV8KsqynQR 2L/zA3uqaUvzCw7f3rUoBqZ1c5eCpxaZgVF3fKwdvzEFzVorHYN2tm5sKWmQEkDzDHMQwZgF3n4jT uATrVWgrb5gRQayrtLN99b6rVvjAfnBZMM4rfZqZOjFFTBf1PsLxuPGN9DkrzNf0XVvMGr8qfUxdQ TwOVJjEh8r8aJXnkCH/IRgzt5TC+l7DfG5GpGOpgcENiFCKhxk9bVaB3Xda8qTsJRW2LmwdTNn0eT YZj6cXpw==; Original-Received: from [::1] (port=40590 helo=whuk14.whukhost.com) by whuk14.whukhost.com with esmtpa (Exim 4.97.1) (envelope-from ) id 1swBpw-0000000CUas-1aeT; Thu, 03 Oct 2024 03:45:23 +0100 In-Reply-To: X-Sender: hugo@heagren.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - whuk14.whukhost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - heagren.com X-Get-Message-Sender-Via: whuk14.whukhost.com: authenticated_id: hugo@heagren.com X-Authenticated-Sender: whuk14.whukhost.com: hugo@heagren.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292878 Archived-At: --=_81e85bd4b66b3956f797dbc2453ab6f1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hi all, following some short comments from Stefan, a better patch is now attached. The new version accounts for the case where multiple adjacent characters have the same translation and are thus presented as a range in `map-char-table'. I've dealt with this by displaying each one individually in the prompt, since: - the user probably *initially set* them separately if they are using the interactive functions - if they aren't using the interactive functions, the prompt doesn't matter Since this is the only substantive change since I was last told this looked good, I've also included a NEWS entry. I have already assigned my copyright to the FSF. Best, Hugo --=_81e85bd4b66b3956f797dbc2453ab6f1 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-Add-commands-to-interactively-set-unset-keyboard-tra.patch Content-Disposition: attachment; filename=0001-Add-commands-to-interactively-set-unset-keyboard-tra.patch; size=4151 RnJvbSA3ZjQ4NjdlY2JkOTcxZTFkMTM4NjhlOTlmM2FlYTVkOWZhNGIwN2MzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIdWdvIEhlYWdyZW4gPGh1Z29AaGVhZ3Jlbi5jb20+CkRhdGU6 IFN1biwgNCBBdWcgMjAyNCAxMjo1NDoyNyArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIEFkZCBjb21t YW5k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IDs7IEFsaWdubWVudCBoZWxwZXJzCisgICAg ICAgICAocGFkIDApCisgICAgICAgICAoa2V5LWNvZGUtZnVuYworICAgICAgICAgIChsYW1iZGEg KGtjIHRyYW5zKQorICAgICAgICAgICAgKGxldCogKChkZXNjIChrZXktZGVzY3JpcHRpb24gYFss a2NdKSkKKyAgICAgICAgICAgICAgICAgICAobGVuIChsZW5ndGggZGVzYykpKQorICAgICAgICAg ICAgICAod2hlbiAoPiBsZW4gcGFkKQorICAgICAgICAgICAgICAgIChzZXRxIHBhZCBsZW4pKQor ICAgICAgICAgICAgICAocHVzaAorICAgICAgICAgICAgICAgYCgsZGVzYyAuICwoa2V5LWRlc2Ny aXB0aW9uIGBbLHRyYW5zXSkpCisgICAgICAgICAgICAgICBmb3JtYXR0ZWQtdHJhbnMtYWxpc3Qp KSkpCisgICAgICAgICAoZm9ybWF0LWZ1bmMKKyAgICAgICAgICAobGFtYmRhIChwYWlyKSA7OyAo a2V5IC4gdmFsdWUpCisgICAgICAgICAgICAoZm9ybWF0CisgICAgICAgICAgICAgIiVzIC0+ICVz IgorICAgICAgICAgICAgIChzdHJpbmctcGFkIChrZXktZGVzY3JpcHRpb24gYFssKGNhciBwYWly KV0pIHBhZCkKKyAgICAgICAgICAgICAoa2V5LWRlc2NyaXB0aW9uIGBbLChjZHIgcGFpcildKSkp KSkKKyAgICA7OyBTZXQgYHBhZCcgYW5kIGBmb3JtYXR0ZWQtdHJhbnMtYWxpc3QnCisgICAgKG1h cC1jaGFyLXRhYmxlCisgICAgIChsYW1iZGEgKGNociB0cmFucykKKyAgICAgICAoaWYgKGNoYXJh Y3RlcnAgY2hyKQorICAgICAgICAgICAoZnVuY2FsbCBrZXktY29kZS1mdW5jIGNociB0cmFucykK KyAgICAgICAgIChyZXF1aXJlICdyYW5nZSkKKyAgICAgICAgIChyYW5nZS1tYXAKKyAgICAgICAg ICAobGFtYmRhIChrYykgKGZ1bmNhbGwga2V5LWNvZGUtZnVuYyBrYyB0cmFucykpC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