emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114345: Silence some --without-x compilation warnin


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114345: Silence some --without-x compilation warnings
Date: Wed, 18 Sep 2013 02:50:13 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114345
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-09-17 19:50:04 -0700
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/custom.el                 custom.el-20091113204419-o5vbwnq5f7feedwu-1093
  lisp/frame.el                  frame.el-20091113204419-o5vbwnq5f7feedwu-275
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
  lisp/window.el                 window.el-20091113204419-o5vbwnq5f7feedwu-94
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-09-18 02:45:31 +0000
+++ b/lisp/ChangeLog    2013-09-18 02:50:04 +0000
@@ -1,5 +1,15 @@
 2013-09-18  Glenn Morris  <address@hidden>
 
+       * 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):

=== modified file 'lisp/custom.el'
--- a/lisp/custom.el    2013-08-02 21:16:33 +0000
+++ b/lisp/custom.el    2013-09-18 02:50:04 +0000
@@ -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 <address@hidden>
 ;; Maintainer: FSF
@@ -1416,6 +1415,10 @@
       (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)))

=== modified file 'lisp/frame.el'
--- a/lisp/frame.el     2013-09-13 16:46:18 +0000
+++ b/lisp/frame.el     2013-09-18 02:50:04 +0000
@@ -889,6 +889,9 @@
 (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)

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2013-09-17 20:27:10 +0000
+++ b/lisp/simple.el    2013-09-18 02:50:04 +0000
@@ -4714,6 +4714,9 @@
   :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)))

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2013-09-15 16:08:04 +0000
+++ b/lisp/window.el    2013-09-18 02:50:04 +0000
@@ -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 @@
   :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 @@
 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 @@
            (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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]