Function: iswitchb-visit-buffer
iswitchb-visit-buffer is a byte-compiled function defined in
iswitchb.el.gz.
Signature
(iswitchb-visit-buffer BUFFER)
Documentation
Visit buffer named BUFFER according to iswitchb-method.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/iswitchb.el.gz
;;; VISIT CHOSEN BUFFER
(defun iswitchb-visit-buffer (buffer)
"Visit buffer named BUFFER according to `iswitchb-method'."
(let (win newframe)
(cond
((eq iswitchb-method 'samewindow)
(switch-to-buffer buffer))
((memq iswitchb-method '(always-frame maybe-frame))
(cond
((and (setq win (iswitchb-window-buffer-p buffer))
(or (eq iswitchb-method 'always-frame)
(y-or-n-p "Jump to frame? ")))
(setq newframe (window-frame win))
(if (fboundp 'select-frame-set-input-focus)
(select-frame-set-input-focus newframe)
(raise-frame newframe)
(select-frame newframe)
)
(select-window win))
(t
;; No buffer in other frames...
(switch-to-buffer buffer)
)))
((eq iswitchb-method 'otherwindow)
(switch-to-buffer-other-window buffer))
((eq iswitchb-method 'display)
(display-buffer buffer))
((eq iswitchb-method 'otherframe)
(progn
(switch-to-buffer-other-frame buffer)
(if (fboundp 'select-frame-set-input-focus)
(select-frame-set-input-focus (selected-frame)))
)))))