changeset 95838:e7b40b183291

(x-toolkit-scroll-bars): Check bound. (x-parse-geometry, x-resource-name) (x-get-selection-internal, tool-bar-mode, set-fontset-font) (new-fontset, x-display-list, x-open-connection, x-get-resource): Define for compiler, for builds without X.
author Glenn Morris <rgm@gnu.org>
date Thu, 12 Jun 2008 03:53:07 +0000
parents 7ea2a6d03884
children 564317b2d075
files lisp/term/mac-win.el
diffstat 1 files changed, 24 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/mac-win.el	Thu Jun 12 03:52:16 2008 +0000
+++ b/lisp/term/mac-win.el	Thu Jun 12 03:53:07 2008 +0000
@@ -1,7 +1,7 @@
 ;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: utf-8-*-
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: Andrew Choi <akochoi@mac.com>
 ;; Keywords: terminals
@@ -153,6 +153,8 @@
 	  (concat x-command-line-resources "\n" (car x-invocation-args))))
   (setq x-invocation-args (cdr x-invocation-args)))
 
+(declare-function x-parse-geometry "frame.c" (string))
+
 ;; Handle the geometry option
 (defun x-handle-geometry (switch)
   (let* ((geo (x-parse-geometry (car x-invocation-args)))
@@ -179,6 +181,8 @@
 		      (if top (list top)))))
     (setq x-invocation-args (cdr x-invocation-args))))
 
+(defvar x-resource-name)
+
 ;; Handle the -name option.  Set the variable x-resource-name
 ;; to the option's operand; set the name of
 ;; the initial frame, too.
@@ -768,6 +772,9 @@
     (setq x-last-selected-text-clipboard text))
   )
 
+(declare-function x-get-selection-internal "xselect.c"
+		  (selection-symbol target-type &optional time-stamp))
+
 (defun x-get-selection (&optional type data-type)
   "Return the value of a selection.
 The argument TYPE (default `PRIMARY') says which selection,
@@ -1198,6 +1205,8 @@
 
 (define-key mac-apple-event-map [hi-command about] 'about-emacs)
 
+(declare-function tool-bar-mode "tool-bar" (&optional arg))
+
 ;;; Converted Carbon Events
 (defun mac-handle-toolbar-switch-mode (event)
   "Toggle visibility of tool-bars in response to EVENT.
@@ -1708,6 +1717,9 @@
 	 ("mac-dingbats" . mac-dingbats))
        font-encoding-alist))
 
+(declare-function set-fontset-font "fontset.c"
+		  (name target font-spec &optional frame add))
+
 (defun fontset-add-mac-fonts (fontset &optional base-family)
   (dolist (elt `((latin . (,(or base-family "Monaco") . "mac-roman"))
 		 (mac-roman . (,base-family . "mac-roman"))
@@ -1717,6 +1729,8 @@
 		 (mac-dingbats . (,base-family . "mac-dingbats"))))
     (set-fontset-font fontset (car elt) (cdr elt))))
 
+(declare-function new-fontset "fontset.c" (name fontlist))
+
 (defun create-fontset-from-mac-roman-font (font &optional resolved-font
 						fontset-name)
   "Create a fontset from a Mac roman font FONT.
@@ -1765,6 +1779,10 @@
       (while (setq i (string-match "[.*]" x-resource-name))
 	(aset x-resource-name i ?-))))
 
+(declare-function x-display-list "macfns.c" ())
+(declare-function x-open-connection "macfns.c"
+		  (display &optional xrm-string must-succeed))
+
 (if (x-display-list)
     ;; On Mac OS 8/9, Most coding systems used in code conversion for
     ;; font names are not ready at the time when the terminal frame is
@@ -1807,7 +1825,7 @@
 
 ;;;; Non-toolkit Scroll bars
 
-(unless x-toolkit-scroll-bars
+(unless (and (boundp 'x-toolkit-scroll-bars) x-toolkit-scroll-bars)
 
 ;; for debugging
 ;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event))
@@ -1850,6 +1868,9 @@
 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
 (create-fontset-from-x-resource)
 
+(declare-function x-get-resource "frame.c"
+		  (attribute class &optional component subclass))
+
 ;; Apply a geometry resource to the initial frame.  Put it at the end
 ;; of the alist, so that anything specified on the command line takes
 ;; precedence.