changeset 95841:b4e36ff621b3

Add some compiler declarations, for builds without X.
author Glenn Morris <rgm@gnu.org>
date Thu, 12 Jun 2008 03:56:20 +0000
parents 0e3c2e18b9c3
children fbeceb242efd
files lisp/ChangeLog lisp/descr-text.el lisp/dired.el lisp/doc-view.el lisp/emacs-lisp/lmenu.el lisp/emacs-lisp/map-ynp.el lisp/faces.el lisp/frame.el lisp/gs.el lisp/image-dired.el lisp/image-mode.el lisp/image.el lisp/international/fontset.el lisp/international/mule-cmds.el lisp/international/mule-diag.el lisp/international/mule-util.el lisp/mail/emacsbug.el lisp/mouse-sel.el lisp/mouse.el lisp/play/bubbles.el lisp/play/gamegrid.el lisp/progmodes/gdb-ui.el lisp/progmodes/gud.el lisp/select.el lisp/startup.el lisp/subr.el lisp/term.el lisp/term/w32-win.el lisp/term/w32console.el lisp/term/x-win.el lisp/textmodes/artist.el lisp/thumbs.el lisp/tool-bar.el lisp/tooltip.el lisp/w32-fns.el lisp/woman.el lisp/x-dnd.el
diffstat 37 files changed, 335 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/ChangeLog	Thu Jun 12 03:56:20 2008 +0000
@@ -1,3 +1,98 @@
+2008-06-12  Glenn Morris  <rgm@gnu.org>
+
+	* progmodes/f90.el (f90-beginning-of-subprogram)
+	(f90-end-of-subprogram): Only give a message when interactive.
+
+	* term/mac-win.el (x-toolkit-scroll-bars): Check bound.
+
+	* progmodes/cperl-mode.el (cperl-info-on-command): Use
+	display-pixel-height rather than x-display-pixel-height.
+
+	* mail/rmailedit.el (rmail-cease-edit):
+	* vc-dispatcher.el (vc-dir-mode): Check tool-bar-mode is bound.
+
+	* emulation/edt.el (edt-xserver):
+	* emulation/edt-mapper.el (edt-xserver): Use replace-regexp-in-string.
+
+	* emulation/edt-mapper.el: Drop test for Emacs < 19.
+
+	* mwheel.el (mouse-wheel-follow-mouse, mwheel-event-window):
+	Evaluate definitions when compiling.  Reverse tests.
+
+	* dframe.el (dframe-reposition-frame-emacs): Reorder test, and
+	use unless.
+
+	* menu-bar.el (w32-menu-bar-open): Declare for compiler.
+
+	* textmodes/artist.el (x-pointer-shape):
+	* term/x-win.el (x-parse-geometry, x-resource-name, accelerate-menu)
+	(x-open-connection, x-server-max-request-size, x-get-resource):
+	* term/w32console.el (x-setup-function-keys):
+	* term/w32-win.el (x-parse-geometry, x-resource-name)
+	(generate-fontset-menu, image-library-alist, x-open-connection)
+	(setup-default-fontset, set-fontset-font, setup-default-fontset)
+	(create-fontset-from-fontset-spec, create-fontset-from-x-resource)
+	(x-get-resource):
+	* term/mac-win.el (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):
+	* progmodes/gud.el (tooltip-last-mouse-motion-event, tooltip-hide)
+	(tooltip-start-delayed-tip, tooltip-use-echo-area, tooltip-show)
+	(tooltip-strip-prompt, tooltip-expr-to-print, tooltip-event-buffer):
+	* progmodes/gdb-ui.el (tooltip-show, tooltip-use-echo-area)
+	(tooltip-identifier-from-point, define-fringe-bitmap):
+	* play/gamegrid.el (image-size):
+	* play/bubbles.el (image-size):
+	* mail/emacsbug.el (x-server-vendor, x-server-version):
+	* international/mule-util.el (internal-char-font):
+	* international/mule-diag.el (font-info, query-fontset, fontset-info)
+	(fontset-alias-alist, fontset-list, fontset-plain-name):
+	* international/mule-cmds.el (x-server-vendor, x-server-version):
+	* international/fontset.el (font-encoding-charset-alist)
+	(otf-script-alist, new-fontset, set-fontset-font)
+	(x-pixel-size-width-font-regexp, vertical-centering-font-regexp)
+	(fontset-list, query-fontset, x-get-resource):
+	* emulation/edt.el (x-server-vendor):
+	* emulation/edt-mapper.el (x-server-vendor):
+	* emacs-lisp/map-ynp.el (x-popup-dialog):
+	* emacs-lisp/lmenu.el (x-popup-dialog):
+	* x-dnd.el (x-window-property, x-change-window-property)
+	(x-get-selection-internal):
+	* woman.el (x-list-fonts):
+	* w32-fns.el (x-server-version):
+	* tooltip.el (x-show-tip, x-hide-tip):
+	* tool-bar.el (image-mask-p):
+	* thumbs.el (image-size):
+	* term.el (overflow-newline-into-fringe):
+	* subr.el (scroll-bar-scale):
+	* startup.el (x-get-resource, tool-bar-mode, image-size):
+	* select.el (x-get-selection-internal, x-own-selection-internal)
+	(x-disown-selection-internal):
+	* mouse.el (generate-fontset-menu):
+	* mouse-sel.el (x-select-text, x-cut-buffer-or-selection-value):
+	* image.el (image-library-alist):
+	* image-mode.el (image-size, image-refresh):
+	* image-dired.el (clear-image-cache):
+	* gs.el (x-display-mm-width, x-display-pixel-width)
+	(x-display-mm-height, x-display-pixel-height)
+	(x-change-window-property, x-display-grayscale-p, x-window-property):
+	* frame.el (tool-bar-mode, x-display-name, x-close-connection)
+	(x-focus-frame, x-list-fonts, x-display-screens)
+	(x-display-pixel-height, x-display-pixel-width, x-display-mm-height)
+	(x-display-mm-width, x-display-backing-store, x-display-save-under)
+	(x-display-planes, x-display-color-cells, x-display-visual-class):
+	* faces.el (internal-face-x-get-resource)
+	(internal-set-lisp-face-attribute-from-resource, x-bitmap-file-path)
+	(fontset-list, x-list-fonts, xw-color-defined-p, xw-color-values)
+	(xw-display-color-p, x-display-grayscale-p, x-get-resource)
+	(x-parse-geometry, x-create-frame, x-setup-function-keys)
+	(tool-bar-setup):
+	* doc-view.el (clear-image-cache, image-size, tooltip-show):
+	* dired.el (dnd-get-local-file-name, dnd-get-local-file-uri):
+	* dframe.el (x-display-pixel-width, x-display-pixel-height):
+	* descr-text.el (internal-char-font):
+	Define for compiler, for builds without X.
+
 2008-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* vc-rcs.el (vc-rcs-state-heuristic): Don't assume the file exists.
--- a/lisp/descr-text.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/descr-text.el	Thu Jun 12 03:56:20 2008 +0000
@@ -318,6 +318,9 @@
 				      (string (string-to-number
 					       (nth 13 fields) 16)))))))))))
 
+;; Not defined on builds without X, but behind display-graphic-p.
+(declare-function internal-char-font "fontset.c" (position &optional ch))
+
 ;; Return information about how CHAR is displayed at the buffer
 ;; position POS.  If the selected frame is on a graphic display,
 ;; return a cons (FONTNAME . GLYPH-CODE) where GLYPH-CODE is a
--- a/lisp/dired.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/dired.el	Thu Jun 12 03:56:20 2008 +0000
@@ -3315,6 +3315,10 @@
 (declare-function dired-relist-entry "dired-aux" (file))
 (declare-function make-symbolic-link "fileio.c")
 
+;; Only used when (featurep 'dnd).
+(declare-function dnd-get-local-file-name "dnd" (uri &optional must-exist))
+(declare-function dnd-get-local-file-uri "dnd" (uri))
+
 (defun dired-dnd-handle-local-file (uri action)
   "Copy, move or link a file to the dired directory.
 URI is the file to handle, ACTION is one of copy, move, link or ask.
--- a/lisp/doc-view.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/doc-view.el	Thu Jun 12 03:56:20 2008 +0000
@@ -628,6 +628,8 @@
                  pdf))
    callback))
 
+(declare-function clear-image-cache "image.c" (&optional filter))
+
 (defun doc-view-pdf->png (pdf png pages)
   "Convert a PDF file to PNG asynchronously.
 Start by converting PAGES, and then the rest."
@@ -728,6 +730,8 @@
 
 ;;;; Slicing
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
 (defun doc-view-set-slice (x y width height)
   "Set the slice of the images that should be displayed.
 You can use this function to tell doc-view not to display the
@@ -864,6 +868,8 @@
 `k' : Kill the conversion process and this buffer.
 `K' : Kill the conversion process.\n"))))
 
+(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
+
 (defun doc-view-show-tooltip ()
   (interactive)
   (tooltip-show (doc-view-current-info)))
--- a/lisp/emacs-lisp/lmenu.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/emacs-lisp/lmenu.el	Thu Jun 12 03:56:20 2008 +0000
@@ -128,6 +128,8 @@
       (setq menu-items (cdr menu-items)))
     menu))
 
+(declare-function x-popup-dialog "xmenu.c" (position contents &optional header))
+
 ;; XEmacs compatibility function
 (defun popup-dialog-box (data)
   "Pop up a dialog box.
--- a/lisp/emacs-lisp/map-ynp.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/emacs-lisp/map-ynp.el	Thu Jun 12 03:56:20 2008 +0000
@@ -34,6 +34,8 @@
 
 ;;; Code:
 
+(declare-function x-popup-dialog "xmenu.c" (position contents &optional header))
+
 (defun map-y-or-n-p (prompter actor list &optional help action-alist
 			      no-cursor-in-echo-area)
   "Ask a series of boolean questions.
--- a/lisp/faces.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/faces.el	Thu Jun 12 03:56:20 2008 +0000
@@ -299,6 +299,12 @@
   :group 'faces)
 
 
+(declare-function internal-face-x-get-resource "xfaces.c"
+		  (resource class frame))
+
+(declare-function internal-set-lisp-face-attribute-from-resource "xfaces.c"
+		  (face attr value &optional frame))
+
 (defun set-face-attribute-from-resource (face attribute resource class frame)
   "Set FACE's ATTRIBUTE from X resource RESOURCE, class CLASS on FRAME.
 Value is the attribute value specified by the resource, or nil
@@ -930,6 +936,8 @@
 	  output
 	(car output)))))
 
+;; Not defined without X, but behind window-system test.
+(defvar x-bitmap-file-path)
 
 (defun face-valid-attribute-values (attribute &optional frame)
   "Return valid values for face attribute ATTRIBUTE.
@@ -1110,6 +1118,9 @@
       (setq new-value (read new-value)))
     new-value))
 
+(declare-function fontset-list "fontset.c" ())
+(declare-function x-list-fonts "xfaces.c"
+		  (pattern &optional face frame maximum width))
 
 (defun read-face-font (face &optional frame)
   "Read the name of a font for FACE on FRAME.
@@ -1586,6 +1597,8 @@
     (mapcar 'car (tty-color-alist frame))))
 (defalias 'x-defined-colors 'defined-colors)
 
+(declare-function xw-color-defined-p "xfns.c" (color &optional frame))
+
 (defun color-defined-p (color &optional frame)
   "Return non-nil if color COLOR is supported on frame FRAME.
 If FRAME is omitted or nil, use the selected frame.
@@ -1598,6 +1611,8 @@
       (numberp (tty-color-translate color frame)))))
 (defalias 'x-color-defined-p 'color-defined-p)
 
+(declare-function xw-color-values "xfns.c" (color &optional frame))
+
 (defun color-values (color &optional frame)
   "Return a description of the color named COLOR on frame FRAME.
 The value is a list of integer RGB values--(RED GREEN BLUE).
@@ -1614,6 +1629,8 @@
       (tty-color-values color frame))))
 (defalias 'x-color-values 'color-values)
 
+(declare-function xw-display-color-p "xfns.c" (&optional terminal))
+
 (defun display-color-p (&optional display)
   "Return t if DISPLAY supports color.
 The optional argument DISPLAY specifies which display to ask about.
@@ -1624,6 +1641,8 @@
     (tty-display-color-p display)))
 (defalias 'x-display-color-p 'display-color-p)
 
+(declare-function x-display-grayscale-p "xfns.c" (&optional terminal))
+
 (defun display-grayscale-p (&optional display)
   "Return non-nil if frames on DISPLAY can display shades of gray."
   (let ((frame-type (framep-on-display display)))
@@ -1788,6 +1807,9 @@
 		 (const :tag "automatic" nil)))
 
 
+(declare-function x-get-resource "frame.c"
+		  (attribute class &optional component subclass))
+
 (defun frame-set-background-mode (frame)
   "Set up display-dependent faces on FRAME.
 Display-dependent faces are those which have different definitions
@@ -1870,6 +1892,8 @@
 ;;; Frame creation.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(declare-function x-parse-geometry "frame.c" (string))
+
 (defun x-handle-named-frame-geometry (parameters)
   "Add geometry parameters for a named frame to parameter list PARAMETERS.
 Value is the new parameter list."
@@ -1916,6 +1940,9 @@
 	    (modify-frame-parameters frame
 				     (list (cons 'cursor-color fg)))))))
 
+(declare-function x-create-frame "xfns.c" (parms))
+(declare-function x-setup-function-keys "term/x-win" (frame))
+(declare-function tool-bar-setup "tool-bar" (&optional frame))
 
 (defun x-create-frame-with-faces (&optional parameters)
   "Create a frame from optional frame parameters PARAMETERS.
--- a/lisp/frame.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/frame.el	Thu Jun 12 03:56:20 2008 +0000
@@ -246,6 +246,8 @@
 (defvar frame-notice-user-settings t
   "Non-nil means function `frame-notice-user-settings' wasn't run yet.")
 
+(declare-function tool-bar-mode "tool-bar" (&optional arg))
+
 ;; startup.el calls this function after loading the user's init
 ;; file.  Now default-frame-alist and initial-frame-alist contain
 ;; information to which we must react; do what needs to be done.
@@ -602,6 +604,7 @@
   (select-frame-set-input-focus (selected-frame)))
 
 (declare-function x-initialize-window-system "term/x-win" ())
+(defvar x-display-name)
 
 (defun make-frame-on-display (display &optional parameters)
   "Make a frame on X display DISPLAY.
@@ -627,6 +630,8 @@
     (error "Invalid terminal type"))
   (make-frame `((window-system . nil) (tty . ,tty) (tty-type . ,type) . ,parameters)))
 
+(declare-function x-close-connection "xfns.c" (terminal))
+
 (defun close-display-connection (display)
   "Close the connection to a display, deleting all its associated frames.
 For DISPLAY, specify either a frame or a display name (a string).
@@ -823,6 +828,8 @@
 	(nreverse frame-initial-geometry-arguments))
   (cdr param-list))
 
+(declare-function x-focus-frame "xfns.c" (frame))
+
 (defun select-frame-set-input-focus (frame)
   "Select FRAME, raise it, and set input focus, if possible."
     (select-frame frame)
@@ -992,6 +999,9 @@
 If FRAME is omitted, describe the currently selected frame."
   (cdr (assq 'width (frame-parameters frame))))
 
+(declare-function x-list-fonts "xfaces.c"
+                  (pattern &optional face frame maximum width))
+
 (defalias 'set-default-font 'set-frame-font)
 (defun set-frame-font (font-name &optional keep-size)
   "Set the font of the selected frame to FONT-NAME.
@@ -1206,6 +1216,8 @@
      (t
       nil))))
 
+(declare-function x-display-screens "xfns.c" (&optional terminal))
+
 (defun display-screens (&optional display)
   "Return the number of screens associated with DISPLAY."
   (let ((frame-type (framep-on-display display)))
@@ -1215,6 +1227,8 @@
      (t
       1))))
 
+(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
+
 (defun display-pixel-height (&optional display)
   "Return the height of DISPLAY's screen in pixels.
 For character terminals, each character counts as a single pixel."
@@ -1225,6 +1239,8 @@
      (t
       (frame-height (if (framep display) display (selected-frame)))))))
 
+(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
+
 (defun display-pixel-width (&optional display)
   "Return the width of DISPLAY's screen in pixels.
 For character terminals, each character counts as a single pixel."
@@ -1253,6 +1269,8 @@
 				  (integer :tag "Height")))
   :group 'frames)
 
+(declare-function x-display-mm-height "xfns.c" (&optional terminal))
+
 (defun display-mm-height (&optional display)
   "Return the height of DISPLAY's screen in millimeters.
 System values can be overridden by `display-mm-dimensions-alist'.
@@ -1263,6 +1281,8 @@
 	   (cddr (assoc t display-mm-dimensions-alist))
 	   (x-display-mm-height display))))
 
+(declare-function x-display-mm-width "xfns.c" (&optional terminal))
+
 (defun display-mm-width (&optional display)
   "Return the width of DISPLAY's screen in millimeters.
 System values can be overridden by `display-mm-dimensions-alist'.
@@ -1273,6 +1293,8 @@
 	   (cadr (assoc t display-mm-dimensions-alist))
 	   (x-display-mm-width display))))
 
+(declare-function x-display-backing-store "xfns.c" (&optional terminal))
+
 (defun display-backing-store (&optional display)
   "Return the backing store capability of DISPLAY's screen.
 The value may be `always', `when-mapped', `not-useful', or nil if
@@ -1284,6 +1306,8 @@
      (t
       'not-useful))))
 
+(declare-function x-display-save-under "xfns.c" (&optional terminal))
+
 (defun display-save-under (&optional display)
   "Return non-nil if DISPLAY's screen supports the SaveUnder feature."
   (let ((frame-type (framep-on-display display)))
@@ -1293,6 +1317,8 @@
      (t
       'not-useful))))
 
+(declare-function x-display-planes "xfns.c" (&optional terminal))
+
 (defun display-planes (&optional display)
   "Return the number of planes supported by DISPLAY."
   (let ((frame-type (framep-on-display display)))
@@ -1304,6 +1330,8 @@
      (t
       (truncate (log (length (tty-color-alist)) 2))))))
 
+(declare-function x-display-color-cells "xfns.c" (&optional terminal))
+
 (defun display-color-cells (&optional display)
   "Return the number of color cells supported by DISPLAY."
   (let ((frame-type (framep-on-display display)))
@@ -1315,6 +1343,8 @@
      (t
       (tty-display-color-cells display)))))
 
+(declare-function x-display-visual-class "xfns.c" (&optional terminal))
+
 (defun display-visual-class (&optional display)
   "Returns the visual class of DISPLAY.
 The value is one of the symbols `static-gray', `gray-scale',
--- a/lisp/gs.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/gs.el	Thu Jun 12 03:56:20 2008 +0000
@@ -1,7 +1,7 @@
 ;;; gs.el --- interface to Ghostscript
 
-;; Copyright (C) 1998, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -93,6 +93,9 @@
 ;; specified in PostScript points.  If omitted, the margins are
 ;; assumed to be 0.
 
+(declare-function x-display-mm-width "xfns.c" (&optional terminal))
+(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
+
 (defun gs-width-in-pt (frame pixel-width)
   "Return, on FRAME, pixel width PIXEL-WIDTH tranlated to pt."
   (let ((mm (* (float pixel-width)
@@ -100,6 +103,8 @@
 		  (float (x-display-pixel-width frame))))))
     (/ (* 25.4 mm) 72.0)))
 
+(declare-function x-display-mm-height "xfns.c" (&optional terminal))
+(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
 
 (defun gs-height-in-pt (frame pixel-height)
   "Return, on FRAME, pixel height PIXEL-HEIGHT tranlated to pt."
@@ -108,6 +113,8 @@
 		  (float (x-display-pixel-height frame))))))
     (/ (* 25.4 mm) 72.0)))
 
+(declare-function x-change-window-property "xfns.c"
+		  (prop value &optional frame type format outer-p))
 
 (defun gs-set-ghostview-window-prop (frame spec img-width img-height)
   "Set the `GHOSTVIEW' window property of FRAME.
@@ -131,6 +138,7 @@
 				      rotation llx lly urx ury xdpi ydpi)
 			      frame)))
 
+(declare-function x-display-grayscale-p "xfns.c" (&optional terminal))
 
 (defun gs-set-ghostview-colors-window-prop (frame pixel-colors)
   "Set the `GHOSTVIEW_COLORS' environment variable depending on FRAME."
@@ -141,8 +149,9 @@
 			      (format "%s %s" mode pixel-colors)
 			      frame)))
 
+(declare-function x-window-property "xfns.c"
+		  (prop &optional frame type source delete-p vector-ret-p))
 
-;
 ;;;###autoload
 (defun gs-load-image (frame spec img-width img-height window-and-pixmap-id
 			    pixel-colors)
--- a/lisp/image-dired.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/image-dired.el	Thu Jun 12 03:56:20 2008 +0000
@@ -1583,6 +1583,8 @@
     [menu-bar image-dired image-dired-next-line-and-display]
     '("Display thumb for next file" . image-dired-next-line-and-display)))
 
+(declare-function clear-image-cache "image.c" (&optional filter))
+
 (defun image-dired-create-thumbs (&optional arg)
   "Create thumbnail images for all marked files in dired.
 With prefix argument ARG, create thumbnails even if they already exist
--- a/lisp/image-mode.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/image-mode.el	Thu Jun 12 03:56:20 2008 +0000
@@ -126,6 +126,8 @@
                      (if (eq (window-buffer) (current-buffer))
                          (selected-window))))
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
 (defun image-forward-hscroll (&optional n)
   "Scroll image in current window to the left by N character widths.
 Stop if the right edge of the image is reached."
@@ -397,6 +399,7 @@
 
 (defvar archive-superior-buffer)
 (defvar tar-superior-buffer)
+(declare-function image-refresh "image.c" (spec &optional frame))
 
 (defun image-toggle-display ()
   "Start or stop displaying an image file as the actual image.
--- a/lisp/image.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/image.el	Thu Jun 12 03:56:20 2008 +0000
@@ -326,6 +326,8 @@
   type)
 
 
+(defvar image-library-alist)
+
 ;;;###autoload
 (defun image-type-available-p (type)
   "Return non-nil if image type TYPE is available.
--- a/lisp/international/fontset.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/international/fontset.el	Thu Jun 12 03:56:20 2008 +0000
@@ -117,6 +117,8 @@
 	("muletibetan-2" . tibetan)
 	("muletibetan-1" . tibetan-1-column)))
 
+(defvar font-encoding-charset-alist)
+
 (setq font-encoding-charset-alist
       '((latin-iso8859-1 . iso-8859-1)
 	(latin-iso8859-2 . iso-8859-2)
@@ -186,6 +188,8 @@
 	(tai-viet #xAA80)
 	(hangul #xAC00)))
 
+(defvar otf-script-alist)
+
 (setq otf-script-alist
       '((arab . arabic)
 	(armn . armenian)
@@ -273,6 +277,10 @@
 ;; `char-script-table'.  SCRIPT may be a charset specifying the range
 ;; of characters.
 
+(declare-function new-fontset "fontset.c" (name fontlist))
+(declare-function set-fontset-font "fontset.c"
+		  (name target font-spec &optional frame add))
+
 (defun setup-default-fontset ()
   "Setup the default fontset."
   (new-fontset
@@ -616,6 +624,9 @@
       (setq font-encoding-alist
 	    (cons (cons pattern charset) font-encoding-alist)))))
 
+(defvar x-pixel-size-width-font-regexp)
+(defvar vertical-centering-font-regexp)
+
 ;; Setting for suppressing XLoadQueryFont on big fonts.
 (setq x-pixel-size-width-font-regexp
       "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5")
@@ -746,6 +757,8 @@
        (string= (match-string (1+ xlfd-regexp-registry-subnum) fontset)
 		"fontset")))
 
+(declare-function fontset-list "fontset.c" ())
+
 (defun generate-fontset-menu ()
   "Return list to be appended to `x-fixed-font-alist'.
 Done when `mouse-set-font' is called."
@@ -757,6 +770,8 @@
     (cons "Fontset"
 	  (sort l #'(lambda (x y) (string< (car x) (car y)))))))
 
+(declare-function query-fontset "fontset.c" (pattern &optional regexpp))
+
 (defun fontset-plain-name (fontset)
   "Return a plain and descriptive name of FONTSET."
   (if (not (setq fontset (query-fontset fontset)))
@@ -947,6 +962,9 @@
 ;; The values of the resources the string of the same format as
 ;; `standard-fontset-spec'.
 
+(declare-function x-get-resource "frame.c"
+		  (attribute class &optional component subclass))
+
 (defun create-fontset-from-x-resource ()
   (let ((idx 0)
 	fontset-spec)
--- a/lisp/international/mule-cmds.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/international/mule-cmds.el	Thu Jun 12 03:56:20 2008 +0000
@@ -1910,6 +1910,9 @@
 			   (features (repeat symbol))
 			   (unibyte-display coding-system)))))
 
+(declare-function x-server-vendor "xfns.c" (&optional terminal))
+(declare-function x-server-version "xfns.c" (&optional terminal))
+
 (defun standard-display-european-internal ()
   ;; Actually set up direct output of non-ASCII characters.
   (standard-display-8bit (if (eq window-system 'pc) 128 160) 255)
--- a/lisp/international/mule-diag.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/international/mule-diag.el	Thu Jun 12 03:56:20 2008 +0000
@@ -818,6 +818,8 @@
 
 ;;; FONT
 
+(declare-function font-info "font.c" (name &optional frame))
+
 (defun describe-font-internal (font-info &optional verbose)
   "Print information about a font in FONT-INFO."
   (print-list "name (opened by):" (aref font-info 0))
@@ -910,6 +912,9 @@
 	    (dolist (opened (cdr elt))
 	      (insert "\n\t[" opened "]")))))))
 
+(declare-function query-fontset "fontset.c" (pattern &optional regexpp))
+(declare-function fontset-info "fontset.c" (fontset &optional frame))
+
 (defun print-fontset (fontset &optional print-opened)
   "Print information about FONTSET.
 If FONTSET is nil, print information about the default fontset.
@@ -930,6 +935,9 @@
     (insert "\n  ---<fallback to the default fontset>---")
     (describe-vector (char-table-extra-slot info 0) 'print-fontset-element)))
 
+(defvar fontset-alias-alist)
+(declare-function fontset-list "fontset.c" ())
+
 ;;;###autoload
 (defun describe-fontset (fontset)
   "Display information about FONTSET.
@@ -952,6 +960,8 @@
     (with-current-buffer standard-output
       (print-fontset fontset t))))
 
+(declare-function fontset-plain-name "fontset" (fontset))
+
 ;;;###autoload
 (defun list-fontsets (arg)
   "Display a list of all fontsets.
--- a/lisp/international/mule-util.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/international/mule-util.el	Thu Jun 12 03:56:20 2008 +0000
@@ -347,6 +347,8 @@
 	(with-coding-priority coding-priority
           (detect-coding-region from to)))))
 
+(declare-function internal-char-font "fontset.c" (position &optional ch))
+
 ;;;###autoload
 (defun char-displayable-p (char)
   "Return non-nil if we should be able to display CHAR.
@@ -374,7 +376,7 @@
 		 (cond
 		  ((listp cs-list)
 		   (catch 'tag
-		     (mapc #'(lambda (charset) 
+		     (mapc #'(lambda (charset)
 			       (if (encode-char char charset)
 				   (throw 'tag charset)))
 			   cs-list)
--- a/lisp/mail/emacsbug.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/mail/emacsbug.el	Thu Jun 12 03:56:20 2008 +0000
@@ -65,6 +65,9 @@
 (defvar report-emacs-bug-orig-text nil
   "The automatically-created initial text of bug report.")
 
+(declare-function x-server-vendor "xfns.c" (&optional terminal))
+(declare-function x-server-version "xfns.c" (&optional terminal))
+
 ;;;###autoload
 (defun report-emacs-bug (topic &optional recent-keys)
   "Report a bug in GNU Emacs.
--- a/lisp/mouse-sel.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/mouse-sel.el	Thu Jun 12 03:56:20 2008 +0000
@@ -305,6 +305,8 @@
 	SELECTION-THING-SYMBOL 	= name of variable where the current selection
  				  type for this selection should be stored.")
 
+(declare-function x-select-text "term/x-win" (text &optional push))
+
 (defvar mouse-sel-set-selection-function
   (if (eq mouse-sel-default-bindings 'interprogram-cut-paste)
       'x-set-selection
@@ -321,6 +323,8 @@
 This sets the selection as well as the cut buffer for the older applications,
 unless `mouse-sel-default-bindings' is `interprogram-cut-paste'.")
 
+(declare-function x-cut-buffer-or-selection-value "term/x-win" ())
+
 (defvar mouse-sel-get-selection-function
   (lambda (selection)
     (if (eq selection 'PRIMARY)
--- a/lisp/mouse.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/mouse.el	Thu Jun 12 03:56:20 2008 +0000
@@ -2425,6 +2425,8 @@
     )
   "X fonts suitable for use in Emacs.")
 
+(declare-function generate-fontset-menu "fontset" ())
+
 (defun mouse-select-font ()
   "Prompt for a font name, using `x-popup-menu', and return it."
   (interactive)
--- a/lisp/play/bubbles.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/play/bubbles.el	Thu Jun 12 03:56:20 2008 +0000
@@ -950,6 +950,8 @@
   (message "bubbles-quit")
   (bury-buffer))
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
 (defun bubbles--compute-offsets ()
   "Update horizontal and vertical offsets for centering the bubbles grid.
 Set `bubbles--col-offset' and `bubbles--row-offset'."
--- a/lisp/play/gamegrid.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/play/gamegrid.el	Thu Jun 12 03:56:20 2008 +0000
@@ -1,7 +1,7 @@
 ;;; gamegrid.el --- library for implementing grid-based games on Emacs
 
-;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: Glynn Clements <glynn@sensei.co.uk>
 ;; Version: 1.02
@@ -304,6 +304,8 @@
 			     'remove-locale)
     (setq buffer-display-table gamegrid-display-table)))
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
 (defun gamegrid-setup-default-font ()
   (setq gamegrid-face
 	(copy-face 'default
--- a/lisp/progmodes/gdb-ui.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/progmodes/gdb-ui.el	Thu Jun 12 03:56:20 2008 +0000
@@ -471,6 +471,9 @@
       (setq name (nth 1 (split-string define "[( ]")))
       (push (cons name define) gdb-define-alist))))
 
+(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
+(defvar tooltip-use-echo-area)
+
 (defun gdb-tooltip-print (expr)
   (tooltip-show
    (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
@@ -755,6 +758,8 @@
 (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
 (define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch)
 
+(declare-function tooltip-identifier-from-point "tooltip" (point))
+
 (defun gud-watch (&optional arg event)
   "Watch expression at point.
 With arg, enter name of variable to be watched in the minibuffer."
@@ -1905,6 +1910,9 @@
 (defvar breakpoint-disabled-icon nil
   "Icon for disabled breakpoint in display margin.")
 
+(declare-function define-fringe-bitmap "fringe.c"
+		  (bitmap bits &optional height width align))
+
 (and (display-images-p)
      ;; Bitmap for breakpoint in fringe
      (define-fringe-bitmap 'breakpoint
@@ -2019,6 +2027,7 @@
 
 (declare-function gud-remove "gdb-ui" t t) ; gud-def
 (declare-function gud-break  "gdb-ui" t t) ; gud-def
+(declare-function fringe-bitmaps-at-pos "fringe.c" (&optional pos window))
 
 (defun gdb-mouse-set-clear-breakpoint (event)
   "Set/clear breakpoint in left fringe/margin at mouse click.
--- a/lisp/progmodes/gud.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/progmodes/gud.el	Thu Jun 12 03:56:20 2008 +0000
@@ -3339,6 +3339,10 @@
       (kill-local-variable 'gud-tooltip-mouse-motions-active)
       (kill-local-variable 'track-mouse))))
 
+(defvar tooltip-last-mouse-motion-event)
+(declare-function tooltip-hide "tooltip" (&optional ignored-arg))
+(declare-function tooltip-start-delayed-tip "tooltip" ())
+
 (defun gud-tooltip-mouse-motion (event)
   "Command handler for mouse movement events in `global-map'."
   (interactive "e")
@@ -3373,6 +3377,9 @@
 
 (define-obsolete-function-alias 'tooltip-gud-toggle-dereference
                                 'gud-tooltip-dereference "22.1")
+(defvar tooltip-use-echo-area)
+(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
+(declare-function tooltip-strip-prompt "tooltip" (process output))
 
 ; This will only display data that comes in one chunk.
 ; Larger arrays (say 400 elements) are displayed in
@@ -3395,6 +3402,8 @@
 	(sdb (concat expr "/"))))
 
 (declare-function gdb-enqueue-input "gdb-ui" (item))
+(declare-function tooltip-expr-to-print "tooltip" (event))
+(declare-function tooltip-event-buffer "tooltip" (event))
 
 (defun gud-tooltip-tips (event)
   "Show tip for identifier or selection under the mouse.
--- a/lisp/select.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/select.el	Thu Jun 12 03:56:20 2008 +0000
@@ -64,6 +64,9 @@
 the next communication only.  After the communication, this
 variable is set to nil.")
 
+(declare-function x-get-selection-internal "xselect.c"
+		  (selection-symbol target-type &optional time-stamp))
+
 ;; This is for temporary compatibility with pre-release Emacs 19.
 (defalias 'x-selection 'x-get-selection)
 (defun x-get-selection (&optional type data-type)
@@ -106,6 +109,11 @@
   "Return text pasted to the clipboard."
   (x-get-selection-internal 'CLIPBOARD 'STRING))
 
+(declare-function x-own-selection-internal "xselect.c"
+		  (selection-name selection-value))
+(declare-function x-disown-selection-internal "xselect.c"
+		  (selection &optional time))
+
 (defun x-set-selection (type data)
   "Make an X Windows selection of type TYPE and value DATA.
 The argument TYPE (nil means `PRIMARY') says which selection, and
--- a/lisp/startup.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/startup.el	Thu Jun 12 03:56:20 2008 +0000
@@ -629,6 +629,10 @@
                (push argi rest)))))
     (nreverse rest)))
 
+(declare-function x-get-resource "frame.c"
+		  (attribute class &optional component subclass))
+(declare-function tool-bar-mode "tool-bar" (&optional arg))
+
 (defun command-line ()
   (setq before-init-time (current-time)
         command-line-default-directory default-directory)
@@ -1365,6 +1369,7 @@
 				   'help-echo (startup-echo-area-message)))))
       (setq args (cdr args)))))
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
 
 (defun fancy-splash-head ()
   "Insert the head part of the splash screen into the current buffer."
--- a/lisp/subr.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/subr.el	Thu Jun 12 03:56:20 2008 +0000
@@ -905,6 +905,8 @@
 and `event-end' functions."
   (nth 2 position))
 
+(declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
+
 (defun posn-col-row (position)
   "Return the nominal column and row in POSITION, measured in characters.
 The column and row values are approximations calculated from the x
--- a/lisp/term.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/term.el	Thu Jun 12 03:56:20 2008 +0000
@@ -925,6 +925,8 @@
 
 (term-set-escape-char ?\C-c)
 
+(defvar overflow-newline-into-fringe)
+
 (defun term-window-width ()
   (if (featurep 'xemacs)
       (1- (window-width))
--- a/lisp/term/w32-win.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/term/w32-win.el	Thu Jun 12 03:56:20 2008 +0000
@@ -185,6 +185,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))
+
 (defun x-handle-geometry (switch)
   "Handle the \"-geometry\" SWITCH."
   (let* ((geo (x-parse-geometry (car x-invocation-args)))
@@ -211,6 +213,8 @@
 		      (if top (list top)))))
     (setq x-invocation-args (cdr x-invocation-args))))
 
+(defvar x-resource-name)
+
 (defun x-handle-name-switch (switch)
   "Handle the \"-name\" SWITCH."
 ;; Handle the -name option.  Set the variable x-resource-name
@@ -417,6 +421,7 @@
   "Report an error when a suspend is attempted."
   (error "Suspending an Emacs running under W32 makes no sense"))
 
+(declare-function generate-fontset-menu "fontset" ())
 
 (defun mouse-set-font (&rest fonts)
   "Select an Emacs font from a list of known good fonts and fontsets.
@@ -451,6 +456,8 @@
 	(if (null font)
 	    (error "Font not found")))))
 
+(defvar image-library-alist)
+
 ;;; Set default known names for image libraries
 (setq image-library-alist
       '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
@@ -468,6 +475,19 @@
 (defvar w32-initialized nil
   "Non-nil if the w32 window system has been initialized.")
 
+(declare-function x-open-connection "w32fns.c"
+                  (display &optional xrm-string must-succeed))
+
+(declare-function setup-default-fontset "fontset" ())
+(declare-function set-fontset-font "fontset.c"
+                  (name target font-spec &optional frame add))
+(declare-function setup-default-fontset "fontset" ())
+(declare-function create-fontset-from-fontset-spec "fontset"
+                  (fontset-spec &optional style-variant noerror))
+(declare-function create-fontset-from-x-resource "fontset" ())
+(declare-function x-get-resource "frame.c"
+                  (attribute class &optional component subclass))
+
 (defun w32-initialize-window-system ()
   "Initialize Emacs for W32 GUI frames."
 
--- a/lisp/term/w32console.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/term/w32console.el	Thu Jun 12 03:56:20 2008 +0000
@@ -45,6 +45,8 @@
     ("white"         15 65535 65535 65535))
 "A list of VGA console colors, their indices and 16-bit RGB values.")
 
+(declare-function x-setup-function-keys "w32-fns" (frame))
+
 (defun terminal-init-w32console ()
   "Terminal initialization function for w32 console."
   ;; Share function key initialization with w32 gui frames
--- a/lisp/term/x-win.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/term/x-win.el	Thu Jun 12 03:56:20 2008 +0000
@@ -1,7 +1,7 @@
 ;;; x-win.el --- parse relevant switches and set up for X  -*-coding: iso-2022-7bit;-*-
 
-;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008 Free Software Foundation, Inc.
 
 ;; Author: FSF
 ;; Keywords: terminals, i18n
@@ -151,6 +151,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)))
@@ -177,6 +179,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.
@@ -1684,6 +1688,8 @@
 	(kill-new clipboard-text))
     (yank)))
 
+(declare-function accelerate-menu "xmenu.c" (&optional frame) t)
+
 (defun x-menu-bar-open (&optional frame)
   "Open the menu bar if `menu-bar-mode' is on. otherwise call `tmm-menubar'."
   (interactive "i")
@@ -1699,6 +1705,12 @@
 (defvar x-initialized nil
   "Non-nil if the X window system has been initialized.")
 
+(declare-function x-open-connection "xfns.c"
+		  (display &optional xrm-string must-succeed))
+(declare-function x-server-max-request-size "xfns.c" (&optional terminal))
+(declare-function x-get-resource "frame.c"
+		  (attribute class &optional component subclass))
+
 (defun x-initialize-window-system ()
   "Initialize Emacs for X frames and open the first connection to an X server."
   ;; Make sure we have a valid resource name.
--- a/lisp/textmodes/artist.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/textmodes/artist.el	Thu Jun 12 03:56:20 2008 +0000
@@ -4733,6 +4733,8 @@
   "Perform the update of the X Windows pointer shape."
   (set-mouse-color nil))
 
+(defvar x-pointer-shape)
+
 (defun artist-set-pointer-shape (new-pointer-shape)
   "Set the shape of the X Windows pointer to NEW-POINTER-SHAPE."
   (setq x-pointer-shape new-pointer-shape)
--- a/lisp/thumbs.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/thumbs.el	Thu Jun 12 03:56:20 2008 +0000
@@ -334,6 +334,8 @@
 	((string-match ".*\\.png\\'" img) 'png)
 	((string-match ".*\\.tiff?\\'" img) 'tiff)))
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
 (defun thumbs-file-size (img)
   (let ((i (image-size
 	    (find-image `((:type ,(thumbs-image-type img) :file ,img))) t)))
--- a/lisp/tool-bar.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/tool-bar.el	Thu Jun 12 03:56:20 2008 +0000
@@ -88,6 +88,8 @@
 		'(menu-item "tool bar" ignore
 			    :filter tool-bar-make-keymap))
 
+(declare-function image-mask-p "image.c" (spec &optional frame))
+
 (defun tool-bar-make-keymap (&optional ignore)
   "Generate an actual keymap from `tool-bar-map'.
 Its main job is to figure out which images to use based on the display's
--- a/lisp/tooltip.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/tooltip.el	Thu Jun 12 03:56:20 2008 +0000
@@ -210,6 +210,9 @@
       (push (cons key value) alist))
     alist))
 
+(declare-function x-show-tip "xfns.c"
+		  (string &optional frame parms timeout dx dy))
+
 (defun tooltip-show (text &optional use-echo-area)
   "Show a tooltip window displaying TEXT.
 
@@ -245,6 +248,8 @@
        (sit-for 1)
        (message "%s" text)))))
 
+(declare-function x-hide-tip "xfns.c" ())
+
 (defun tooltip-hide (&optional ignored-arg)
   "Hide a tooltip, if one is displayed.
 Value is non-nil if tooltip was open."
--- a/lisp/w32-fns.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/w32-fns.el	Thu Jun 12 03:56:20 2008 +0000
@@ -76,6 +76,8 @@
 ;; same buffer.
 (setq find-file-visit-truename t)
 
+(declare-function x-server-version "w32fns.c" (&optional display))
+
 (defun w32-version ()
   "Return the MS-Windows version numbers.
 The value is a list of three integers: the major and minor version
--- a/lisp/woman.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/woman.el	Thu Jun 12 03:56:20 2008 +0000
@@ -1013,6 +1013,9 @@
 	   (setq symbol-fonts (cons font symbol-fonts))))
     symbol-fonts))
 
+(declare-function x-list-fonts "xfaces.c"
+		  (pattern &optional face frame maximum width))
+
 (when woman-font-support
   (make-face 'woman-symbol)
 
--- a/lisp/x-dnd.el	Thu Jun 12 03:54:06 2008 +0000
+++ b/lisp/x-dnd.el	Thu Jun 12 03:56:20 2008 +0000
@@ -356,6 +356,9 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;  Old KDE protocol.  Only dropping of files.
 
+(declare-function x-window-property "xfns.c"
+		  (prop &optional frame type source delete-p vector-ret-p))
+
 (defun x-dnd-handle-old-kde (event frame window message format data)
   "Open the files in a KDE 1.x drop."
   (let ((values (x-window-property "DndSelection" frame nil 0 t)))
@@ -376,6 +379,9 @@
     ("XdndActionAsk" . ask))
   "Mapping from XDND action types to lisp symbols.")
 
+(declare-function x-change-window-property "xfns.c"
+		  (prop value &optional frame type format outer-P))
+
 (defun x-dnd-init-xdnd-for-frame (frame)
   "Set the XdndAware property for FRAME to indicate that we do XDND."
   (x-change-window-property "XdndAware"
@@ -420,8 +426,11 @@
 	   (+ frame-real-top (nth 1 edges))))
       (cons frame-real-left frame-real-top))))
 
-(declare-function x-get-atom-name "xselect.c")
-(declare-function x-send-client-message "xselect.c")
+(declare-function x-get-atom-name "xselect.c" (value &optional frame))
+(declare-function x-send-client-message "xselect.c"
+		  (display dest from message-type format values))
+(declare-function x-get-selection-internal "xselect.c"
+		  (selection-symbol target-type &optional time-stamp))
 
 (defun x-dnd-handle-xdnd (event frame window message format data)
   "Receive one XDND event (client message) and send the appropriate reply.