[Top][All Lists]

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

Re: POLL: make C-x o transient

From: Juri Linkov
Subject: Re: POLL: make C-x o transient
Date: Thu, 28 Jan 2021 10:50:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> Maybe something simple like:
>> #+begin_src emacs-lisp
>> (put 'other-window 'repeatable-command t)
>> (put 'enlarge-window 'repeatable-command t)
>> (put 'enlarge-window-horizontally 'repeatable-command t)
>> (put 'shrink-window-horizontally 'repeatable-command t)
>> (add-hook 'post-command-hook 'repeatable-command)
> I like this idea, but would the hook be added by default?

The comment in emacs/lisp/repeat.el says:

  ;; It would of course be trivial to implement last-prefix-arg &
  ;; true-last-command by putting something in post-command-hook, but that
  ;; entails a performance hit; the approach taken below avoids that.

so better to avoid the hook.

reply via email to

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