[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Repeat undo-only is not working
From: |
Juri Linkov |
Subject: |
Re: Repeat undo-only is not working |
Date: |
Mon, 23 Aug 2021 19:06:01 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> ```
> (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)
BTW, a typo here: (kbd "M-/") is missing.
> (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?
Sorry, this part of the feature is still unpolished.
The intention was to disallow repeating of undo with
the key sequence `C-/ u', but allow only with `C-x u u'.
Maybe this was a wrong idea? Do you think it should be
possible to type `C-/' to initiate the repeating sequence
`C-/ u u u'?