emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repeat undo-only is not working


From: Fu Yuan
Subject: Re: Repeat undo-only is not working
Date: Mon, 23 Aug 2021 06:52:51 -0700

> 在 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 via email to

[Prev in Thread] Current Thread [Next in Thread]