unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
Cc: emacs-devel@gnu.org
Subject: Re: Getting magic numbers 134217734 etc in a repetable keymap
Date: Sat, 03 Apr 2021 16:14:11 +0300	[thread overview]
Message-ID: <83r1jrecik.fsf@gnu.org> (raw)
In-Reply-To: <TY2PR0101MB3693FBA1AC86AD0C68AED29CDA799@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (message from Ramesh Nedunchezian on Sat, 3 Apr 2021 17:28:12 +0530)

> From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
> 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.



  reply	other threads:[~2021-04-03 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03  6:20 Getting magic numbers 134217734 etc in a repetable keymap Ramesh Nedunchezian
2021-04-03  7:32 ` Eli Zaretskii
2021-04-03 11:58   ` Ramesh Nedunchezian
2021-04-03 13:14     ` Eli Zaretskii [this message]
2021-04-03 15:14       ` Ramesh Nedunchezian
2021-04-03  8:16 ` Andreas Schwab
2021-04-05 20:47 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r1jrecik.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rameshnedunchezian@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).