Skip to content

Instantly share code, notes, and snippets.

@GeorgeJahad
Created August 20, 2009 22:17
Show Gist options
  • Save GeorgeJahad/171457 to your computer and use it in GitHub Desktop.
Save GeorgeJahad/171457 to your computer and use it in GitHub Desktop.
(lexical-let
((curbuf 0)
(buflist '("shell1"
"shell2"
"shell3"
"shell4"
"shell5"
"shell7"
"shell8"
"shell9"
"shell10"
"shell11"
"shell12"
"shell13"
"shell14")))
(defun gbj-next-buffer ()
(interactive)
(setq curbuf (+ 1 curbuf))
(if (>= curbuf (length buflist))
(setq curbuf 0))
(switch-to-buffer (nth curbuf buflist))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment