Function: next-buffer
next-buffer is an interactive and byte-compiled function defined in
window.el.gz.
Signature
(next-buffer &optional ARG INTERACTIVE)
Documentation
In selected window switch to ARGth next buffer.
Call switch-to-next-buffer unless the selected window is the
minibuffer window or is dedicated to its buffer.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun next-buffer (&optional arg interactive)
"In selected window switch to ARGth next buffer.
Call `switch-to-next-buffer' unless the selected window is the
minibuffer window or is dedicated to its buffer."
(interactive "p\np")
(cond
((window-minibuffer-p)
(user-error "Cannot switch buffers in minibuffer window"))
((eq (window-dedicated-p) t)
(user-error "Window is strongly dedicated to its buffer"))
(t
(dotimes (_ (or arg 1))
(when (and (not (switch-to-next-buffer))
interactive
(not (or executing-kbd-macro noninteractive)))
(user-error "No next buffer"))))))