Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created June 25, 2011 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbender/1046906 to your computer and use it in GitHub Desktop.
Save johnbender/1046906 to your computer and use it in GitHub Desktop.
hook for switch to or creating windows in emacs
;; advise the other-window function as a hook into switching windows
;; with C-x o
(defadvice other-window (after my-test-advice activate)
(my-super-awesome-function))
;; when creating or adding a window fire the hook
(add-hook 'window-configuration-change-hook 'my-super-awesome-function)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment