unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Repeat undo-only is not working
Date: Mon, 23 Aug 2021 19:06:01 +0300	[thread overview]
Message-ID: <87eeakgqa6.fsf@mail.linkov.net> (raw)
In-Reply-To: <20210823131240.rxfepbz4q2buo733@Ergus> (Ergus's message of "Mon,  23 Aug 2021 15:12:40 +0200")

> ```
> (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'?



  parent reply	other threads:[~2021-08-23 16:06 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
2021-08-23 16:06   ` Juri Linkov [this message]
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=87eeakgqa6.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --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).