Skip to content

Instantly share code, notes, and snippets.

@legumbre
Created September 28, 2011 03:03
Show Gist options
  • Save legumbre/1246882 to your computer and use it in GitHub Desktop.
Save legumbre/1246882 to your computer and use it in GitHub Desktop.
;; 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