diff options
author | Glenn Morris <rgm@gnu.org> | 2013-09-17 19:50:04 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-09-17 19:50:04 -0700 |
commit | e740f9d245b007e51fcc706338a4a1ac450c8307 (patch) | |
tree | 5c77f31de5804c1ee09b1b9f740294730ce400fd /lisp/window.el | |
parent | 91c837fe7281b7588a8bfbd4c265a6d8cef69fb9 (diff) | |
download | emacs-e740f9d245b007e51fcc706338a4a1ac450c8307.tar.gz |
Silence some --without-x compilation warnings
* 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.
Diffstat (limited to 'lisp/window.el')
-rw-r--r-- | lisp/window.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el index 14e9f6bc128..e4959da3d21 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -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))) |