Skip to content

Commit

Permalink
Merge pull request #1596 from lem-project/add-frame-multiplexer-switc…
Browse files Browse the repository at this point in the history
…h-n-command

add `frame-multiplexer-switch-{n}` command
  • Loading branch information
cxxxr authored Nov 11, 2024
2 parents 7433cc1 + cd766c9 commit 5c72ad8
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 5c72ad8

Please sign in to comment.