[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Just o after C-x o (other-window)
From: |
Drew Adams |
Subject: |
RE: Just o after C-x o (other-window) |
Date: |
Thu, 20 Apr 2017 16:23:02 -0700 (PDT) |
> I would like the other-window function to behave like text-scale-adjust.
> I mean, after hitting `C-x o` to select next window, I want `o` to mean
> next-window again. Any other key would escape this minor mode. Did
> somebody here by any chance implement that already?
>
> The text-scale-adjust function behaves like that, after `C-x C-+` it is
> enough to hit `+` or `-` to further adjust the scaling, which I think is
> excellent.
(defun other-window-repeat ()
"Repeatable `other-window'."
(interactive)
(require 'repeat)
(repeat-command 'other-window))
(defun repeat-command (command)
"Repeat COMMAND."
(let ((repeat-message-function 'ignore))
(setq last-repeatable-command command)
(repeat nil)))
(global-set-key [remap other-window] 'other-window-repeat)
Then just use `C-x o o o o o ...'