unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Fu Yuan <casouri@gmail.com>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel <emacs-devel@gnu.org>, Juri Linkov <juri@linkov.net>
Subject: Re: Repeat undo-only is not working
Date: Mon, 23 Aug 2021 06:52:51 -0700	[thread overview]
Message-ID: <949B151B-7E8D-47D9-8BD9-DA69EA74AC98@gmail.com> (raw)
In-Reply-To: <20210823131240.rxfepbz4q2buo733@Ergus>


> 在 2021年8月23日,上午6:17,Ergus <spacibba@aol.com> 写道:
> 
> Hi Juri:
> 
> I have this config:
> 
> ```
> (global-set-key (kbd "C-/") #'undo-only)
> (global-set-key (kbd "C-M-/") #'undo-redo)
> 
> (with-eval-after-load 'repeat
>  (defvar undo-redo-repeat-map
>    (let ((map (make-sparse-keymap)))
>      (define-key map "/" #'undo-only)
>      (define-key map "M-/" #'undo-redo)
>      (define-key map "U" #'undo)
>      map)
>    "Keymap to repeat undo-redo key sequences.  Used in `repeat-mode'.")
>  (put 'undo-only 'repeat-map 'undo-redo-repeat-map)
>  (put 'undo-redo 'repeat-map 'undo-redo-repeat-map)
>  (put 'undo 'repeat-map 'undo-redo-repeat-map))
> ```
> 
> And for some reason the repeat map does not activates with "undo-only"
> (it doesn't even shows the message in the minibuffer) but with "undo"
> and "undo-redo" it works as expected. Is there anything special in
> "undo-only" that disables repeat-mode?
> 

Maybe because undo-only sets this-command to undo?

Yuan


  reply	other threads:[~2021-08-23 13:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210823131240.rxfepbz4q2buo733.ref@Ergus>
2021-08-23 13:12 ` Repeat undo-only is not working Ergus
2021-08-23 13:52   ` Fu Yuan [this message]
2021-08-23 16:06   ` Juri Linkov
2021-08-23 20:30     ` Ergus
2021-08-23 20:50     ` Jim Porter
2021-08-24  6:40       ` Juri Linkov
2021-08-24 16:36         ` Jim Porter

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=949B151B-7E8D-47D9-8BD9-DA69EA74AC98@gmail.com \
    --to=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=spacibba@aol.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).