Browse files

Do not call switch-to-buffer-in-tab if not loaded

tabbar-window is not loaded when running with -nw
  • Loading branch information...
davidswelt committed Sep 11, 2013
1 parent c41502b commit 0fe940f6ee60231554415a6e6830d41752ad39b1
Showing with 2 additions and 2 deletions.
  1. +1 −1 aquamacs/src/site-lisp/aquamacs.el
  2. +1 −1 lisp/files.el
@@ -108,7 +108,7 @@ automatically choosing a major mode, use \\[find-file-literally]."
(let ((value (find-file-noselect filename nil nil wildcards)))
- (if tabbar-mode
+ (if (and tabbar-mode (functionp 'switch-to-buffer-in-tab))
(if (listp value)
(mapcar 'switch-to-buffer-in-tab (nreverse value))
(switch-to-buffer-in-tab value))
@@ -4545,7 +4545,7 @@ change the additional actions you can take on files."
(setq queried t)
(with-current-buffer buffer
(select-window (get-window-for-other-buffer))
- (if (and (boundp 'tabbar-mode) tabbar-mode)
+ (if (and (boundp 'tabbar-mode) tabbar-mode (boundp 'switch-to-buffer-in-tab))
(switch-to-buffer-in-tab buffer)
(switch-to-buffer buffer))
(select-frame-set-input-focus (window-frame (selected-window)))

0 comments on commit 0fe940f

Please sign in to comment.