Skip to content

Instantly share code, notes, and snippets.

@mpontus
Created February 12, 2015 02:25
Show Gist options
  • Save mpontus/134a6ee8be70c37b68b6 to your computer and use it in GitHub Desktop.
Save mpontus/134a6ee8be70c37b68b6 to your computer and use it in GitHub Desktop.
(ncaa/add-handler
:for window
:name ncaa/selected-window-if-changed
(lambda (fn &rest args)
((starting-window (selected-window)))
(unless (eq starting-window (selected-window))
(prog1 (selected-window)
(select-window starting-window)))))
(ncaa/add-handler
(:for window
:name ncaa/selected-window-if-changed)
(lambda (fn &rest args)
((starting-window (selected-window)))
(unless (eq starting-window (selected-window))
(prog1 (selected-window)
(select-window starting-window)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment