Skip to content

Commit

Permalink
add frame-multiplexer-switch-{n} command
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Nov 11, 2024
1 parent 3e5bbc3 commit cd766c9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/ext/frame-multiplexer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
:frame-multiplexer-next
:frame-multiplexer-prev
:frame-multiplexer-switch
:frame-multiplexer-switch-0
:frame-multiplexer-switch-1
:frame-multiplexer-switch-2
:frame-multiplexer-switch-3
:frame-multiplexer-switch-4
:frame-multiplexer-switch-5
:frame-multiplexer-switch-6
:frame-multiplexer-switch-7
:frame-multiplexer-switch-8
:frame-multiplexer-switch-9
:frame-multiplexer-create-with-new-buffer-list
:frame-multiplexer-delete
:frame-multiplexer-recent
Expand Down Expand Up @@ -430,6 +440,21 @@ The prefix argument ID defaults to 1."
(switch-current-frame vf (frame-table-entry-frame entry))
(editor-error "No frame with ID ~a" id))))

(macrolet ((def (command-name n)
`(define-command (,command-name (:advice-classes frame-multiplexer-advice))
() ()
(frame-multiplexer-switch ,n))))
(def frame-multiplexer-switch-0 0)
(def frame-multiplexer-switch-1 1)
(def frame-multiplexer-switch-2 2)
(def frame-multiplexer-switch-3 3)
(def frame-multiplexer-switch-4 4)
(def frame-multiplexer-switch-5 5)
(def frame-multiplexer-switch-6 6)
(def frame-multiplexer-switch-7 7)
(def frame-multiplexer-switch-8 8)
(def frame-multiplexer-switch-9 9))

(define-command (frame-multiplexer-recent (:advice-classes frame-multiplexer-advice))
(&optional (n 1)) (:universal)
"Switch to the Nth most recent frame selected.
Expand Down

0 comments on commit cd766c9

Please sign in to comment.