]> code.delx.au - gnu-emacs/blobdiff - lisp/frame.el
Update copyright year to 2015
[gnu-emacs] / lisp / frame.el
index 952a3568156d7e2cb115d9ae2b6f4a9cb3f2194a..8b927309f0a12c27d5001f8395e477da535395a6 100644 (file)
@@ -1,6 +1,7 @@
 ;;; frame.el --- multi-frame management independent of window systems  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 1996-1997, 2000-2015 Free Software
+;; Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
@@ -32,7 +33,7 @@
   (intern (format "%s-alist" base)))
 
 (defmacro gui-method (name &optional type)
-  (macroexp-let2 nil type (or type `(framep (selected-frame)))
+  (macroexp-let2 nil type (or type `window-system)
     `(alist-get ,type ,(gui-method--name name)
                 (lambda (&rest _args)
                   (error "No method %S for %S frame" ',name ,type)))))
@@ -43,7 +44,7 @@
 (defmacro gui-method-declare (name &optional tty-fun doc)
   (declare (doc-string 3) (indent 2))
   `(defvar ,(gui-method--name name)
-     ,(if tty-fun `(list (cons t ,tty-fun))) ,doc))
+     ,(if tty-fun `(list (cons nil ,tty-fun))) ,doc))
 
 (defmacro gui-call (name &rest args)
   `(funcall (gui-method ,name) ,@args))
@@ -305,7 +306,7 @@ there (in decreasing order of priority)."
                                     frame-initial-frame-tool-bar-height)))
                        (t (+ top frame-initial-frame-tool-bar-height)))))
                  (modify-frame-parameters
-                  frame-initial-frame '((top . adjusted-top))))))
+                  frame-initial-frame `((top . ,adjusted-top))))))
            (tool-bar-mode -1))))
 
       ;; The initial frame we create above always has a minibuffer.
@@ -646,23 +647,22 @@ frame the selected frame.  However, the window system may select
 the new frame according to its own rules."
   (interactive)
   (let* ((display (cdr (assq 'display parameters)))
-         (w (or
-             (cond
-              ((assq 'terminal parameters)
-               (let ((type (terminal-live-p
-                            (cdr (assq 'terminal parameters)))))
-                 (cond
-                  ((null type) (error "Terminal %s does not exist"
-                                      (cdr (assq 'terminal parameters))))
-                  (t type))))
-              ((assq 'window-system parameters)
-               (cdr (assq 'window-system parameters)))
-              (display
-               (or (window-system-for-display display)
-                   (error "Don't know how to interpret display %S"
-                          display)))
-              (t window-system))
-             t))
+         (w (cond
+             ((assq 'terminal parameters)
+              (let ((type (terminal-live-p
+                           (cdr (assq 'terminal parameters)))))
+                (cond
+                 ((eq t type) nil)
+                 ((null type) (error "Terminal %s does not exist"
+                                     (cdr (assq 'terminal parameters))))
+                 (t type))))
+             ((assq 'window-system parameters)
+              (cdr (assq 'window-system parameters)))
+             (display
+              (or (window-system-for-display display)
+                  (error "Don't know how to interpret display %S"
+                         display)))
+             (t window-system)))
         (oldframe (selected-frame))
         (params parameters)
         frame)