Created
September 28, 2011 03:01
-
-
Save legumbre/1246878 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; for fhrodes, advice jump-to-register so erc always scrolls to | |
;; bottom after a window config restore | |
(defadvice jump-to-register (after jump-to-register-and-scroll (register &optional del) activate) | |
"Scroll all erc buffers to bottom after jumping to a window configuration" | |
(when (window-configuration-p (car (get-register register))) | |
(mapcar (lambda (b) (with-current-buffer b | |
(when (eq major-mode 'erc-mode) | |
(goto-char (erc-end-of-input-line)) | |
(erc-scroll-to-bottom (get-buffer-window b t) t)))) | |
(buffer-list)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment