# HG changeset patch # User Glenn Morris # Date 1213242787 0 # Node ID e7b40b183291cc8019993ea33cf3a8e5a7e92d1d # Parent 7ea2a6d03884ace93b1d08e6f9785bb500f8dddc (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. diff -r 7ea2a6d03884 -r e7b40b183291 lisp/term/mac-win.el --- 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 ;; 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.