frameset.el (frameset--jump-to-register): Check that buffer is live (bug#16749).
[bpt/emacs.git] / lisp / frame.el
index 57f9395..59e4d67 100644 (file)
@@ -1,9 +1,9 @@
 ;;; frame.el --- multi-frame management independent of window systems
 
-;; Copyright (C) 1993-1994, 1996-1997, 2000-2013 Free Software
+;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
 ;; Package: emacs
 
@@ -127,6 +127,7 @@ Focus-in events are usually bound to this function.
 Focus-in events occur when a frame has focus, but a switch-frame event
 is not generated.
 This function runs the hook `focus-in-hook'."
+  (interactive "e")
   (run-hooks 'focus-in-hook))
 
 (defun handle-focus-out (_event)
@@ -134,6 +135,7 @@ This function runs the hook `focus-in-hook'."
 Focus-out events are usually bound to this function.
 Focus-out events occur when no frame has focus.
 This function runs the hook `focus-out-hook'."
+  (interactive "e")
   (run-hooks 'focus-out-hook))
 \f
 ;;;; Arrangement of frames at startup
@@ -208,6 +210,8 @@ This function runs the hook `focus-out-hook'."
 
 (declare-function tool-bar-mode "tool-bar" (&optional arg))
 
+(defalias 'tool-bar-lines-needed 'tool-bar-height)
+
 ;; startup.el calls this function after loading the user's init
 ;; file.  Now default-frame-alist and initial-frame-alist contain
 ;; information to which we must react; do what needs to be done.
@@ -536,10 +540,14 @@ is not considered (see `next-frame')."
 (defun window-system-for-display (display)
   "Return the window system for DISPLAY.
 Return nil if we don't know how to interpret DISPLAY."
-  (cl-loop for descriptor in display-format-alist
-           for pattern = (car descriptor)
-           for system = (cdr descriptor)
-           when (string-match-p pattern display) return system))
+  ;; MS-Windows doesn't know how to create a GUI frame in a -nw session.
+  (if (and (eq system-type 'windows-nt)
+          (null (window-system)))
+      nil
+    (cl-loop for descriptor in display-format-alist
+            for pattern = (car descriptor)
+            for system = (cdr descriptor)
+            when (string-match-p pattern display) return system)))
 
 (defun make-frame-on-display (display &optional parameters)
   "Make a frame on display DISPLAY.