]> git.eshelyaron.com Git - emacs.git/commitdiff
Silence some --without-x compilation warnings
authorGlenn Morris <rgm@gnu.org>
Wed, 18 Sep 2013 02:50:04 +0000 (19:50 -0700)
committerGlenn Morris <rgm@gnu.org>
Wed, 18 Sep 2013 02:50:04 +0000 (19:50 -0700)
* custom.el (x-get-resource): Declare.

* frame.el (x-display-grayscale-p): Declare.

* simple.el (font-info): Declare.

* window.el (x-display-pixel-height, tool-bar-lines-needed): Declare.
(fit-frame-to-buffer): Explicit error if --without-x.
(mouse-autoselect-window-select): Silence compiler.

lisp/ChangeLog
lisp/custom.el
lisp/frame.el
lisp/simple.el
lisp/window.el

index 5b911a503b8ce06017648e34e01736b9325ee8e5..c6940ca600aada606d3bc9aaeda340a484c8265a 100644 (file)
@@ -1,5 +1,15 @@
 2013-09-18  Glenn Morris  <rgm@gnu.org>
 
+       * custom.el (x-get-resource): Declare.
+
+       * frame.el (x-display-grayscale-p): Declare.
+
+       * simple.el (font-info): Declare.
+
+       * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare.
+       (fit-frame-to-buffer): Explicit error if --without-x.
+       (mouse-autoselect-window-select): Silence compiler.
+
        * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare.
 
        * eshell/em-cmpl.el (eshell-complete-parse-arguments):
index 3db34e4d1fb10da98f510e9494e0b40154156833..d721198da0bb1b7eb537e157a6bf5fca94ba0308 100644 (file)
@@ -1,7 +1,6 @@
 ;;; custom.el --- tools for declaring and initializing options
 ;;
-;; Copyright (C) 1996-1997, 1999, 2001-2013 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1996-1997, 1999, 2001-2013 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: FSF
@@ -1416,6 +1415,10 @@ See `custom-enabled-themes' for a list of enabled themes."
       (setq custom-enabled-themes
            (delq theme custom-enabled-themes)))))
 
+;; Only used if window-system not null.
+(declare-function x-get-resource "frame.c"
+                 (attribute class &optional component subclass))
+
 (defun custom--frame-color-default (frame attribute resource-attr resource-class
                                          tty-default x-default)
   (let ((col (face-attribute 'default attribute t)))
index 74149a8dc010008bcbedd2fcec9a9a5f47c2e9ad..1980e639283936bf819c94926cbc011680f4f428 100644 (file)
@@ -889,6 +889,9 @@ e.g. (mapc 'frame-set-background-mode (frame-list))."
 (declare-function x-get-resource "frame.c"
                  (attribute class &optional component subclass))
 
+;; Only used if window-system is not null.
+(declare-function x-display-grayscale-p "xfns.c" (&optional terminal))
+
 (defvar inhibit-frame-set-background-mode nil)
 
 (defun frame-set-background-mode (frame &optional keep-face-specs)
index 34774712437df63f7290ebb381c802609c54a6cf..bf531de8ae4232574c11e8762f23be95bd7641dd 100644 (file)
@@ -4714,6 +4714,9 @@ lines."
   :group 'editing-basics
   :version "23.1")
 
+;; Only used if display-graphic-p.
+(declare-function font-info "font.c" (name &optional frame))
+
 (defun default-font-height ()
   "Return the height in pixels of the current buffer's default face font."
   (let ((default-font (face-font 'default)))
index 14e9f6bc128e1e5fec70f1431d20b17fc02b13fb..e4959da3d21b2d43bad87a89bdd5a05cc1d193ae 100644 (file)
@@ -1,7 +1,6 @@
 ;;; window.el --- GNU Emacs window commands aside from those written in C
 
-;; Copyright (C) 1985, 1989, 1992-1994, 2000-2013 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985, 1989, 1992-1994, 2000-2013 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -6153,6 +6152,9 @@ reduce this.  If it is thicker, you might want to increase this."
   :version "24.3"
   :group 'windows)
 
+(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
+(declare-function tool-bar-lines-needed "xdisp.c" (&optional frame))
+
 (defun fit-frame-to-buffer (&optional frame max-height min-height)
   "Adjust height of FRAME to display its buffer contents exactly.
 FRAME can be any live frame and defaults to the selected one.
@@ -6163,6 +6165,8 @@ top line of FRAME, minus `fit-frame-to-buffer-bottom-margin'.
 Optional argument MIN-HEIGHT specifies the minimum height of FRAME.
 The default corresponds to `window-min-height'."
   (interactive)
+  (or (fboundp 'x-display-pixel-height)
+      (user-error "Cannot resize frame in non-graphic Emacs"))
   (setq frame (window-normalize-frame frame))
   (let* ((root (frame-root-window frame))
         (frame-min-height
@@ -6685,7 +6689,7 @@ is active.  This function is run by `mouse-autoselect-window-timer'."
            (window-at (cadr mouse-position) (cddr mouse-position)
                       (car mouse-position)))))
      (cond
-      ((or (menu-or-popup-active-p)
+      ((or (and (fboundp 'menu-or-popup-active-p) (menu-or-popup-active-p))
           (and window
                (let ((coords (coordinates-in-window-p
                               (cdr mouse-position) window)))