aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-06-12 03:53:07 +0000
committerGlenn Morris2008-06-12 03:53:07 +0000
commit777a7291841b52b20c7d23cd9cbdb74d7bc88971 (patch)
tree88311c3496148af866ba9ff2bf4fa0f15da79d9b
parenta2697346fba4fd648aa79c7fa4a8753424ec1bec (diff)
downloademacs-777a7291841b52b20c7d23cd9cbdb74d7bc88971.tar.gz
emacs-777a7291841b52b20c7d23cd9cbdb74d7bc88971.zip
(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.
-rw-r--r--lisp/term/mac-win.el27
1 files changed, 24 insertions, 3 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 4d80ca904a5..829e0d2e640 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1,7 +1,7 @@
1;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: utf-8-*- 1;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: utf-8-*-
2 2
3;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 4;; 2008 Free Software Foundation, Inc.
5 5
6;; Author: Andrew Choi <akochoi@mac.com> 6;; Author: Andrew Choi <akochoi@mac.com>
7;; Keywords: terminals 7;; Keywords: terminals
@@ -153,6 +153,8 @@
153 (concat x-command-line-resources "\n" (car x-invocation-args)))) 153 (concat x-command-line-resources "\n" (car x-invocation-args))))
154 (setq x-invocation-args (cdr x-invocation-args))) 154 (setq x-invocation-args (cdr x-invocation-args)))
155 155
156(declare-function x-parse-geometry "frame.c" (string))
157
156;; Handle the geometry option 158;; Handle the geometry option
157(defun x-handle-geometry (switch) 159(defun x-handle-geometry (switch)
158 (let* ((geo (x-parse-geometry (car x-invocation-args))) 160 (let* ((geo (x-parse-geometry (car x-invocation-args)))
@@ -179,6 +181,8 @@
179 (if top (list top))))) 181 (if top (list top)))))
180 (setq x-invocation-args (cdr x-invocation-args)))) 182 (setq x-invocation-args (cdr x-invocation-args))))
181 183
184(defvar x-resource-name)
185
182;; Handle the -name option. Set the variable x-resource-name 186;; Handle the -name option. Set the variable x-resource-name
183;; to the option's operand; set the name of 187;; to the option's operand; set the name of
184;; the initial frame, too. 188;; the initial frame, too.
@@ -768,6 +772,9 @@ This is in addition to the primary selection."
768 (setq x-last-selected-text-clipboard text)) 772 (setq x-last-selected-text-clipboard text))
769 ) 773 )
770 774
775(declare-function x-get-selection-internal "xselect.c"
776 (selection-symbol target-type &optional time-stamp))
777
771(defun x-get-selection (&optional type data-type) 778(defun x-get-selection (&optional type data-type)
772 "Return the value of a selection. 779 "Return the value of a selection.
773The argument TYPE (default `PRIMARY') says which selection, 780The argument TYPE (default `PRIMARY') says which selection,
@@ -1198,6 +1205,8 @@ Currently the `mailto' scheme is supported."
1198 1205
1199(define-key mac-apple-event-map [hi-command about] 'about-emacs) 1206(define-key mac-apple-event-map [hi-command about] 'about-emacs)
1200 1207
1208(declare-function tool-bar-mode "tool-bar" (&optional arg))
1209
1201;;; Converted Carbon Events 1210;;; Converted Carbon Events
1202(defun mac-handle-toolbar-switch-mode (event) 1211(defun mac-handle-toolbar-switch-mode (event)
1203 "Toggle visibility of tool-bars in response to EVENT. 1212 "Toggle visibility of tool-bars in response to EVENT.
@@ -1708,6 +1717,9 @@ See also `mac-dnd-known-types'."
1708 ("mac-dingbats" . mac-dingbats)) 1717 ("mac-dingbats" . mac-dingbats))
1709 font-encoding-alist)) 1718 font-encoding-alist))
1710 1719
1720(declare-function set-fontset-font "fontset.c"
1721 (name target font-spec &optional frame add))
1722
1711(defun fontset-add-mac-fonts (fontset &optional base-family) 1723(defun fontset-add-mac-fonts (fontset &optional base-family)
1712 (dolist (elt `((latin . (,(or base-family "Monaco") . "mac-roman")) 1724 (dolist (elt `((latin . (,(or base-family "Monaco") . "mac-roman"))
1713 (mac-roman . (,base-family . "mac-roman")) 1725 (mac-roman . (,base-family . "mac-roman"))
@@ -1717,6 +1729,8 @@ See also `mac-dnd-known-types'."
1717 (mac-dingbats . (,base-family . "mac-dingbats")))) 1729 (mac-dingbats . (,base-family . "mac-dingbats"))))
1718 (set-fontset-font fontset (car elt) (cdr elt)))) 1730 (set-fontset-font fontset (car elt) (cdr elt))))
1719 1731
1732(declare-function new-fontset "fontset.c" (name fontlist))
1733
1720(defun create-fontset-from-mac-roman-font (font &optional resolved-font 1734(defun create-fontset-from-mac-roman-font (font &optional resolved-font
1721 fontset-name) 1735 fontset-name)
1722 "Create a fontset from a Mac roman font FONT. 1736 "Create a fontset from a Mac roman font FONT.
@@ -1765,6 +1779,10 @@ It returns a name of the created fontset."
1765 (while (setq i (string-match "[.*]" x-resource-name)) 1779 (while (setq i (string-match "[.*]" x-resource-name))
1766 (aset x-resource-name i ?-)))) 1780 (aset x-resource-name i ?-))))
1767 1781
1782(declare-function x-display-list "macfns.c" ())
1783(declare-function x-open-connection "macfns.c"
1784 (display &optional xrm-string must-succeed))
1785
1768(if (x-display-list) 1786(if (x-display-list)
1769 ;; On Mac OS 8/9, Most coding systems used in code conversion for 1787 ;; On Mac OS 8/9, Most coding systems used in code conversion for
1770 ;; font names are not ready at the time when the terminal frame is 1788 ;; font names are not ready at the time when the terminal frame is
@@ -1807,7 +1825,7 @@ It returns a name of the created fontset."
1807 1825
1808;;;; Non-toolkit Scroll bars 1826;;;; Non-toolkit Scroll bars
1809 1827
1810(unless x-toolkit-scroll-bars 1828(unless (and (boundp 'x-toolkit-scroll-bars) x-toolkit-scroll-bars)
1811 1829
1812;; for debugging 1830;; for debugging
1813;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event)) 1831;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event))
@@ -1850,6 +1868,9 @@ It returns a name of the created fontset."
1850;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). 1868;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
1851(create-fontset-from-x-resource) 1869(create-fontset-from-x-resource)
1852 1870
1871(declare-function x-get-resource "frame.c"
1872 (attribute class &optional component subclass))
1873
1853;; Apply a geometry resource to the initial frame. Put it at the end 1874;; Apply a geometry resource to the initial frame. Put it at the end
1854;; of the alist, so that anything specified on the command line takes 1875;; of the alist, so that anything specified on the command line takes
1855;; precedence. 1876;; precedence.