all messages for Emacs-related lists mirrored at yhetil.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 10:32:11 +0300	[thread overview]
Message-ID: <83tuonesck.fsf@gnu.org> (raw)
In-Reply-To: <TY2PR0101MB369349166BAD9A83D02BB3C3DA799@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (message from Ramesh Nedunchezian on Sat, 3 Apr 2021 11:50:50 +0530)

> From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
> Date: Sat, 3 Apr 2021 11:50:50 +0530
> 
> I would like to create a repeatable keymap which has magic number
> 134217734 etc in it using either `define-key' or any other API.
> 
> I have tried the following, and it desn't work
> 
>     (define-key sexp--repeat-map
>       (vector
>        (car
> 	(listify-key-sequence
> 	 (kbd "C-M-f"))))
>       'forward-sexp)
> 
> Getting numbers like 134217734 etc in to the repeatable keymap are
> important for successful setting up of repetition. That is, for
> repetition to succeed, the condition below in `repeat-post-hook' need
> to succeed.
> 
>     (or (memq last-command-event keys)
> 	(memq this-original-command '(universal-argument
> 				      universal-argument-more
> 				      digit-argument
> 				      negative-argument)))
> 
> ... and when I invoke C-M-f `last-command-event' comes out as 134217734.
> 
> ----------------
> 
> For now I have hard-coded `sexp--repeat-map' as below, and this works
> as expected.  But I want a cleaner and less-hackish recipe for achieving the same.

Display the "magic" numbers in hex, and I think you will see the way
clearly.



  reply	other threads:[~2021-04-03  7:32 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 [this message]
2021-04-03 11:58   ` Ramesh Nedunchezian
2021-04-03 13:14     ` Eli Zaretskii
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

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

  git send-email \
    --in-reply-to=83tuonesck.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.