diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-02-26 17:01:21 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-02-26 17:18:05 -0700 |
commit | 33867a366d1b11443f05efae24e512950e93b1f9 (patch) | |
tree | 50eb318989d1a78fc31f73343155851eedfe0662 | |
parent | c380d20bb724e8b2e724d35443d9bbe72bd76d82 (diff) | |
download | dotfiles-33867a366d1b11443f05efae24e512950e93b1f9.tar.gz |
transient-cycles: bring two defuns up out of cl-symbol-macrolet
-rw-r--r-- | .emacs.d/site-lisp/transient-cycles.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.emacs.d/site-lisp/transient-cycles.el b/.emacs.d/site-lisp/transient-cycles.el index 083a5338..e8580fb7 100644 --- a/.emacs.d/site-lisp/transient-cycles.el +++ b/.emacs.d/site-lisp/transient-cycles.el @@ -492,17 +492,19 @@ take you back there." recent-buffer)) :keymap transient-cycles-window-buffers-mode-map :cycle-forwards-key transient-cycles-window-buffers-cycle-forwards-key - :cycle-backwards-key transient-cycles-window-buffers-cycle-backwards-key) + :cycle-backwards-key transient-cycles-window-buffers-cycle-backwards-key)) - (defun transient-cycles--reset-window-recent-buffer (&rest _ignore) - (setq param nil)) +(defun transient-cycles--reset-window-recent-buffer (&rest _ignore) + (set-window-parameter nil 'transient-cycles--window-recent-bufer nil)) - (defun transient-cycles-window-buffers-back-and-forth () - "Switch to the buffer most recently accessed using the bindings +(defun transient-cycles-window-buffers-back-and-forth () + "Switch to the buffer most recently accessed using the bindings established by `transient-cycles-window-buffers-mode', on the condition that no other commands have set this window's buffer since then. Otherwise, call `previous-buffer'." - (interactive) + (interactive) + (cl-symbol-macrolet + ((param (window-parameter nil 'transient-cycles--window-recent-bufer))) (cond (param (let ((new (and (window-next-buffers) (* -1 param)))) (cond ((cl-plusp param) (next-buffer param)) |