|
From: | Jose E. Marchesi |
Subject: | Re: POLL: make C-x o transient |
Date: | Mon, 25 Jan 2021 18:27:16 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> Which will make `C-x o` invoke a transient version of `other-window' >> like `text-scale-adjust’ does. > > I think the pattern is clear: `C-x <letter>` are good candidates ;-) > >> (defcustom transient-other-window nil) >> >> (defun other-window-backward () >> (interactive) >> (other-window -1)) >> >> (defun transient-other-window () >> (interactive) >> (let ((echo-keystrokes nil)) >> (other-window 1) >> (set-transient-map >> (let ((map (make-sparse-keymap))) >> (define-key map "o" #'other-window) >> (define-key map "O" #'other-window-backward) >> map) >> t))) >> >> (if transient-other-window >> (global-set-key (kbd "C-x o") #'transient-other-window) >> (global-set-key (kbd "C-x o") #'other-window)) > > It needs work, but I agree with the intention. +1
[Prev in Thread] | Current Thread | [Next in Thread] |