aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/bs.el
diff options
context:
space:
mode:
authorChong Yidong <[email protected]>2007-06-05 15:59:15 +0000
committerChong Yidong <[email protected]>2007-06-05 15:59:15 +0000
commitb49bf494d2860b79f694148d55df9326aff08d8f (patch)
tree390852a61efc0b4215f53c61d1e9d3a193e5b47b /lisp/bs.el
parent27e165152b8365e566b30155e7e7cdf7b0a3c6ae (diff)
(bs-cycle-previous): Don't modify the cycle list until
`switch-to-buffer' has returned succesfully. (bs-cycle-next): Ditto. Also, don't bury the buffer when the window is dedicated (it could iconify the frame).
Diffstat (limited to 'lisp/bs.el')
-rw-r--r--lisp/bs.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/bs.el b/lisp/bs.el
index b1fa47100f..5951d129d9 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1221,10 +1221,13 @@ by buffer configuration `bs-cycle-configuration-name'."
bs--cycle-list)))
(next (car tupel))
(cycle-list (cdr tupel)))
+ (unless (window-dedicated-p (selected-window))
+ ;; We don't want the frame iconified if the only window in the frame
+ ;; happens to be dedicated; let's get the error from switch-to-buffer
+ (bury-buffer))
+ (switch-to-buffer next)
(setq bs--cycle-list (append (cdr cycle-list)
(list (car cycle-list))))
- (bury-buffer)
- (switch-to-buffer next)
(bs-message-without-log "Next buffers: %s"
(or (cdr bs--cycle-list)
"this buffer"))))))
@@ -1251,9 +1254,9 @@ by buffer configuration `bs-cycle-configuration-name'."
bs--cycle-list)))
(prev-buffer (car tupel))
(cycle-list (cdr tupel)))
+ (switch-to-buffer prev-buffer)
(setq bs--cycle-list (append (last cycle-list)
(reverse (cdr (reverse cycle-list)))))
- (switch-to-buffer prev-buffer)
(bs-message-without-log "Previous buffers: %s"
(or (reverse (cdr bs--cycle-list))
"this buffer"))))))