Function: bs-cycle-next

bs-cycle-next is an autoloaded, interactive and byte-compiled function defined in bs.el.gz.

Signature

(bs-cycle-next)

Documentation

Select next buffer defined by buffer cycling.

The buffers taking part in buffer cycling are defined by buffer configuration bs-cycle-configuration-name.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/bs.el.gz
;;;###autoload
(defun bs-cycle-next ()
  "Select next buffer defined by buffer cycling.
The buffers taking part in buffer cycling are defined
by buffer configuration `bs-cycle-configuration-name'."
  (interactive)
  (let ((bs--buffer-coming-from (current-buffer))
	(bs-dont-show-regexp   bs-dont-show-regexp)
	(bs-must-show-regexp   bs-must-show-regexp)
	(bs-dont-show-function bs-dont-show-function)
	(bs-must-show-function bs-must-show-function)
	(bs--show-all          nil))
    (bs-set-configuration (or bs-cycle-configuration-name bs-default-configuration))
    (let ((bs-buffer-sort-function nil)
	  (bs--current-sort-function nil))
      (let* ((tuple (bs-next-buffer (if (or (eq last-command
						'bs-cycle-next)
					    (eq last-command
						'bs-cycle-previous))
					bs--cycle-list)))
             (next (car tuple))
             (cycle-list (cdr tuple)))
        (bury-buffer (current-buffer))
	(switch-to-buffer next nil t)
	(setq bs--cycle-list (append (cdr cycle-list)
				     (list (car cycle-list))))
	(bs-message-without-log "Next buffers: %s"
				(or (cdr bs--cycle-list)
				    "this buffer"))))))