From f2d9c15f597ab17a78244c4e019d708d5290ac19 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 11 Aug 2008 01:23:07 +0000 Subject: [PATCH] Add declarations for builds without X. --- lisp/ChangeLog | 17 +++++++++++++++++ lisp/calendar/cal-menu.el | 2 ++ lisp/calendar/calendar.el | 2 ++ lisp/calendar/holidays.el | 2 ++ lisp/dired.el | 1 + lisp/hi-lock.el | 2 ++ lisp/mouse.el | 1 + lisp/progmodes/cperl-mode.el | 2 ++ lisp/term/ns-win.el | 9 +++++++++ lisp/term/w32-win.el | 4 ++++ lisp/term/x-win.el | 6 ++++++ 11 files changed, 48 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 954502ce31..70004b7c68 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2008-08-11 Glenn Morris + + * dired.el (x-popup-menu): + * hi-lock.el (x-popup-menu): + * mouse.el (font-face-attributes): + * calendar/cal-menu.el (x-popup-menu): + * calendar/calendar.el (x-popup-menu): + * calendar/holidays.el (x-popup-menu): + * progmodes/cperl-mode.el (x-popup-menu): + * term/ns-win.el (dnd-open-file, tool-bar-mode, scroll-bar-scale) + (x-open-connection): + * term/w32-win.el (x-colors, x-handle-args, x-parse-geometry) + (x-command-line-resources): + * term/x-win.el (x-colors, x-parse-geometry, x-resource-name) + (x-display-name, x-command-line-resources): + Add declarations for builds without X. + 2008-08-10 Glenn Morris * calendar/cal-bahai.el (holiday-bahai): Doc fix. diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index e456f85bfe..8818498480 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -153,6 +153,8 @@ ["Backward 1 Year" (calendar-scroll-right 12) :keys "4 M-v"]) "Key map for \"Scroll\" menu in the calendar.") +(declare-function x-popup-menu "xmenu.c" (position menu)) + (defmacro cal-menu-x-popup-menu (event title &rest body) "Call `x-popup-menu' at position EVENT, with TITLE and contents BODY. Signals an error if popups are unavailable." diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index dc2f8ce907..68a1406875 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -2422,6 +2422,8 @@ DATE is (month day year). Calendars that do not apply are omitted." (format "Mayan date: %s" (calendar-mayan-date-string date)))))) +(declare-function x-popup-menu "xmenu.c" (position menu)) + (defun calendar-print-other-dates (&optional event) "Show dates on other calendars for date under the cursor. If called by a mouse-event, pops up a menu with the result." diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 8b554e0582..9e703df114 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -624,6 +624,8 @@ The holidays are those in the list `calendar-holidays'." (define-obsolete-function-alias 'check-calendar-holidays 'calendar-check-holidays "23.1") +(declare-function x-popup-menu "xmenu.c" (position menu)) + ;;;###cal-autoload (defun calendar-cursor-holidays (&optional date event) "Find holidays for the date specified by the cursor in the calendar window. diff --git a/lisp/dired.el b/lisp/dired.el index 06a11a6b47..a7388ddc08 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3314,6 +3314,7 @@ Anything else means ask for each directory." (message-box "Dired recursive copies are currently disabled.\nSee the variable `dired-recursive-copies'.")) +(declare-function x-popup-menu "xmenu.c" (position menu)) (defun dired-dnd-do-ask-action (uri) ;; No need to get actions and descriptions from the source, diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index da6bd44124..4d9be48726 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -447,6 +447,8 @@ lower-case letters made case insensitive." (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) +(declare-function x-popup-menu "xmenu.c" (position menu)) + ;;;###autoload (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) ;;;###autoload diff --git a/lisp/mouse.el b/lisp/mouse.el index 416336d7e4..e8adeb8810 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2473,6 +2473,7 @@ choose a font." (declare-function x-select-font "xfns.c" (&optional frame ignored)) ; USE_GTK (declare-function buffer-face-mode-invoke "face-remap" (face arg &optional interactive)) +(declare-function font-face-attributes "font.c" (font &optional frame)) (defun mouse-appearance-menu (event) (interactive "@e") diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 57ecf03e2c..9f57f62b94 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -7089,6 +7089,8 @@ Use as (cons cons1 (car cperl-hierarchy))))))) (end-of-line)))) +(declare-function x-popup-menu "xmenu.c" (position menu)) + (defun cperl-tags-hier-init (&optional update) "Show hierarchical menu of classes and methods. Finds info about classes by a scan of loaded TAGS files. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index f11b34a7ab..0cd5ffc12d 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -749,6 +749,8 @@ this defaults to \"printenv\"." (defvar ns-input-spi-name) (defvar ns-input-spi-arg) +(declare-function dnd-open-file "dnd" (uri action)) + (defun ns-spi-service-call () "Respond to a service request." (interactive) @@ -1209,6 +1211,9 @@ unless the current buffer is a scratch buffer.") ;; (if this is not done, modeline is dimmed until first interaction) (add-hook 'after-make-frame-functions 'select-frame) +(defvar tool-bar-mode) +(declare-function tool-bar-mode "tool-bar" (&optional arg)) + ;; Based on a function by David Reitter ; ;; see http://lists.gnu.org/archive/html/emacs-devel/2005-09/msg00681.html . (defun ns-toggle-toolbar (&optional frame) @@ -1397,6 +1402,8 @@ See the documentation of `create-fontset-from-fontset-spec for the format.") (global-unset-key [vertical-scroll-bar mouse-1]) (global-unset-key [vertical-scroll-bar drag-mouse-1]) +(declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) + (defun ns-scroll-bar-move (event) "Scroll the frame according to a Nextstep scroller event." (interactive "e") @@ -1561,6 +1568,8 @@ Note, tranparency works better on Tiger (10.4) and higher." "Non-nil if Nextstep windowing has been initialized.") (declare-function ns-list-services "nsfns.m" ()) +(declare-function x-open-connection "xfns.c" + (display &optional xrm-string must-succeed)) ;; Do the actual Nextstep Windows setup here; the above code just ;; defines functions and variables that we use now. diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 7cc0cd2f62..cd000ea53d 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -147,6 +147,7 @@ the last file dropped is selected." (global-set-key [language-change] 'ignore) (defvar x-resource-name) +(defvar x-colors) (defun xw-defined-colors (&optional frame) @@ -225,6 +226,9 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (declare-function create-fontset-from-x-resource "fontset" ()) (declare-function x-get-resource "frame.c" (attribute class &optional component subclass)) +(declare-function x-handle-args "common-win" (args)) +(declare-function x-parse-geometry "frame.c" (string)) +(defvar x-command-line-resources) (defun w32-initialize-window-system () "Initialize Emacs for W32 GUI frames." diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 4bcbb3e703..1cfdeaf084 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -253,6 +253,8 @@ exists." (defconst x-pointer-invisible 255) +(defvar x-colors) + (defun xw-defined-colors (&optional frame) "Internal function called by `defined-colors', which see." (or frame (setq frame (selected-frame))) @@ -1449,6 +1451,10 @@ The value nil is the same as this list: (declare-function x-server-max-request-size "xfns.c" (&optional terminal)) (declare-function x-get-resource "frame.c" (attribute class &optional component subclass)) +(declare-function x-parse-geometry "frame.c" (string)) +(defvar x-resource-name) +(defvar x-display-name) +(defvar x-command-line-resources) (defun x-initialize-window-system () "Initialize Emacs for X frames and open the first connection to an X server." -- 2.20.1