From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Getting magic numbers 134217734 etc in a repetable keymap Date: Sat, 03 Apr 2021 16:14:11 +0300 Message-ID: <83r1jrecik.fsf@gnu.org> References: <83tuonesck.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27323"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ramesh Nedunchezian Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 03 15:15:00 2021 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 1lSg79-0006wC-3n for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Apr 2021 15:14:59 +0200 Original-Received: from localhost ([::1]:58268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSg78-0001r0-2e for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Apr 2021 09:14:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSg6a-0001RB-0t for emacs-devel@gnu.org; Sat, 03 Apr 2021 09:14:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53007) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSg6Z-0006jl-2s; Sat, 03 Apr 2021 09:14:23 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lSg6Y-0002Jg-1i; Sat, 03 Apr 2021 09:14:22 -0400 In-Reply-To: (message from Ramesh Nedunchezian on Sat, 3 Apr 2021 17:28:12 +0530) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:267344 Archived-At: > From: Ramesh Nedunchezian > Date: Sat, 3 Apr 2021 17:28:12 +0530 > > > Display the "magic" numbers in hex, and I think you will see the way > > clearly. > > I am dumb. I unable to take your hint. Can I have a full > recipe. Maybe I don't understand what kind of recipe you are looking for. I thought you were asking how to synthesize those "magic numbers" given the key description such as "C-M-f". That is what I tried to explain: if you display the number 134217734 in hex you will see #x8000006, which is C-f (ASCII 6) with the Meta bit ORed. > Getting the magic value of C-M-f is not an issue. > > But, getting the magic number _verbatim_ in to the _repeat-map__ is > the issue. Note the emphasis on words "verbatim" and "repeat-map". I'm dumb, I don't think I see the difference. > i.e., I want a recipe which will create this keymap > > '(keymap > (134217734 . forward-sexp) > ;; (102 . forward-sexp) > ) > > instead of the > > (keymap > (27 keymap > (6 . forward-sexp))) > > i.e. The problem with `define-key' is that it is converting C-M-f in > to ESC C-f and this 2-level keymap I DO NOT want. The two level > keymap gets in the way of setting up a repeatable keymap which will > help me do C-M-f f f f f etc. I think I explained exactly what you want: how to get the numerical value corresponding to C-M-f and any other key that includes modifiers. If that still doesn't help you, then I'm sorry; someone else will have to do better.