core/autoload/buffers: cycle buffers silently

This commit is contained in:
Henrik Lissner 2017-02-21 00:44:35 -05:00
parent cb4b61b1ac
commit 27a3041f40

View file

@ -129,8 +129,7 @@ See `doom-real-buffer-p' for what 'real' means."
(catch 'goto (catch 'goto
(if (or (not buffers) (if (or (not buffers)
(= (length buffers) 1)) (= (length buffers) 1))
(progn (message "No other buffers in workspace") (throw 'goto t)
(throw 'goto t))
(funcall move-func) (funcall move-func)
(while (not (memq (current-buffer) buffers)) (while (not (memq (current-buffer) buffers))
(if (or (eq (current-buffer) start-buffer) (if (or (eq (current-buffer) start-buffer)
@ -140,8 +139,7 @@ See `doom-real-buffer-p' for what 'real' means."
(cl-incf i)) (cl-incf i))
(current-buffer)))) (current-buffer))))
(when (eq destbuf t) (when (eq destbuf t)
(setq destbuf (doom-fallback-buffer)) (setq destbuf (doom-fallback-buffer)))
(message "Nowhere to go"))
(prog1 (prog1
(switch-to-buffer destbuf) (switch-to-buffer destbuf)
(when (eq destbuf (doom-fallback-buffer)) (when (eq destbuf (doom-fallback-buffer))