From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Delegating user-reserved key binding space definition to users Date: Mon, 21 Nov 2022 14:37:07 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6404"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs developers To: Psionic K Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 21 20:44:09 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oxCi8-0001Re-R4 for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Nov 2022 20:44:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxChV-0004UQ-RK; Mon, 21 Nov 2022 14:43:29 -0500 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 1oxChR-0004U9-HJ for emacs-devel@gnu.org; Mon, 21 Nov 2022 14:43:25 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxChP-00059F-MV for emacs-devel@gnu.org; Mon, 21 Nov 2022 14:43:25 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BFBB01003A4; Mon, 21 Nov 2022 14:37:16 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0899D100182; Mon, 21 Nov 2022 14:37:15 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1669059435; bh=p4qAP2+6mDHyJZdkZLnPQbZXuGKBJsuvyY/R0FhMNgE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QCW46WA5FPDDJ5TfO4AF4MytwiQt+LyWhsOquP60oh+ICX1XxaqVJkEhKa+c4hl1+ j41IC+XWn6hN3LiFha8BexIqepU5veSDBPgfiacJ9tJW9VKFT93AU9uKODE/Cd2eFr uy1/ZASG5/CJpIpH2MsSSjC7G0cZHb+hvS0zF94+lOqx1b33qC3B+5dpOJKYgLBp/n eMsXL0KAhJXjdpc+X3Qx+naIISMeigRyWXRrQJPnpdvYxaCbFIq3+pF084nlAwA+Uv YUSjvJ5/0L8svmN9AQV0Tm6eZJ3puU7FOJ6ux17+MIiec5HYuL2k65dY8TLPpilIXJ 7kVf8VhsacJbg== Original-Received: from pastel (unknown [104.247.241.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A592E1201BE; Mon, 21 Nov 2022 14:37:14 -0500 (EST) In-Reply-To: (Psionic K.'s message of "Mon, 21 Nov 2022 08:40:58 -0600") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300306 Archived-At: > - Multiple modifiers such as M-S-* or long sequences such as C-* C-* *. > M-? is also an example of what I consider to require multiple-modifiers on > a US key layout where '?' requires shift. > - High-value space such as M-* and C-* [...] > It was suggested that advice might work for implementation, up to a point, > since define-key doesn't have a dedicated code of some type I'm unaware of. Doing it inside `define-key` is problematic because you can bind a key to `C-a C-b C-c` via three calls to `define-key`, so you won't be able to detect the problem reliably in all cases: (let* ((map1 (make-sparse-keymap)) (map2 (make-sparse-keymap)) (map3 (make-sparse-keymap))) (define-key map1 [?\C-a] map2) (define-key map2 [?\C-b] map3) (define-key map3 [?\C-c] 'foo)) -- Stefan