+ (when (featurep 'xemacs)
+ (defvar window-point-insertion-type nil)
+ (unless (fboundp 'defadvice)
+ (autoload 'defadvice "advice" nil nil 'macro))
+ (unless (boundp 'help-echo-owns-message)
+ (defvar help-echo-owns-message))
+ (unless (boundp 'gnus-registry-enabled)
+ (defvar gnus-registry-enabled nil))
+ (unless (boundp 'mail-dont-reply-to-names)
+ (defvar mail-dont-reply-to-names nil))
+ (unless (fboundp 'url-retrieve-synchronously)
+ (defalias 'url-retrieve-synchronously 'url-retrieve))
+ (unless (fboundp 'url-queue-retrieve)
+ (defun url-queue-retrieve (url callback &optional cbargs silent
+ inhibit-cookies)
+ (url-retrieve url callback cbargs)))
+ (unless (boundp 'w3-configuration-directory)
+ (setq w3-configuration-directory "~/.w3/"))
+ (autoload 'Info-directory "info" nil t)
+ (autoload 'Info-index "info" nil t)
+ (autoload 'Info-index-next "info" nil t)
+ (autoload 'Info-menu "info" nil t)
+ (autoload 'ad-add-advice "advice")
+ (unless (and (emacs-version>= 21 5)
+ (not (featurep 'sxemacs)))
+ ;; calendar/auto-autoloads.el provides it.
+ (autoload 'add-to-invisibility-spec "dummy"))
+ (autoload 'annotations-at "annotations")
+ (autoload 'apropos "apropos" nil t)
+ (autoload 'apropos-command "apropos" nil t)
+ (autoload 'bbdb-complete-name "bbdb-com" nil t)
+ (autoload 'browse-url "browse-url" nil t)
+ (autoload 'browse-url-of-file "browse-url" nil t)
+ (autoload 'c-mode "cc-mode" nil t)
+ (autoload 'customize-apropos "cus-edit" nil t)
+ (autoload 'customize-group "cus-edit" nil t)
+ (autoload 'customize-save-variable "cus-edit" nil t)
+ (autoload 'customize-set-variable "cus-edit" nil t)
+ (autoload 'customize-variable "cus-edit" nil t)
+ (autoload 'debug "debug" nil t)
+ (autoload 'sha1 "sha1")
+ (if (featurep 'mule)
+ (unless (locate-library "mule-ccl")
+ (autoload 'define-ccl-program "ccl" nil nil 'macro))
+ (defalias 'define-ccl-program 'ignore))
+ (autoload 'delete-annotation "annotations")
+ (autoload 'dolist "cl-macs" nil nil 'macro)
+ (autoload 'enriched-decode "enriched")
+ (autoload 'eudc-expand-inline "eudc" nil t)
+ (autoload 'executable-find "executable")
+ (autoload 'font-lock-fontify-buffer "font-lock" nil t)
+ (when (and (emacs-version>= 21 5)
+ (not (featurep 'sxemacs)))
+ (autoload 'get-display-table "disp-table")
+ (autoload 'put-display-table "disp-table"))
+ (autoload 'info "info" nil t)
+ (autoload 'mail-extract-address-components "mail-extr")
+ (autoload 'mail-fetch-field "mail-utils")
+ (autoload 'make-annotation "annotations")
+ (autoload 'make-display-table "disp-table")
+ (autoload 'pp "pp")
+ (autoload 'ps-despool "ps-print" nil t)
+ (autoload 'ps-spool-buffer "ps-print" nil t)
+ (autoload 'ps-spool-buffer-with-faces "ps-print" nil t)
+ (autoload 'read-passwd "passwd")
+ (autoload 'regexp-opt "regexp-opt")
+ (autoload 'reporter-submit-bug-report "reporter")
+ (if (condition-case nil
+ (progn
+ (require 'rot13)
+ (not (fboundp 'rot13-string)))
+ (error nil))
+ (defmacro rot13-string (string)
+ "Return ROT13 encryption of STRING."
+ `(let ((string ,string))
+ (with-temp-buffer
+ (insert string)
+ (translate-region (point-min) (point-max) ,rot13-display-table)
+ (buffer-string)))))
+ (if (and (emacs-version>= 21 5)
+ (not (featurep 'sxemacs)))
+ (autoload 'setenv "process" nil t)
+ (autoload 'setenv "env" nil t))
+ (autoload 'sgml-mode "psgml" nil t)
+ (autoload 'smtpmail-send-it "smtpmail")
+ (autoload 'sort-numeric-fields "sort" nil t)
+ (autoload 'sort-subr "sort")
+ (autoload 'thing-at-point "thingatpt")
+ (autoload 'toggle-truncate-lines "view-less" nil t)
+ (autoload 'trace-function-background "trace" nil t)
+ (autoload 'unmorse-region "morse" nil t)
+ (defalias 'frame-char-height 'frame-height)
+ (defalias 'frame-char-width 'frame-width)
+ (defalias 'frame-parameter 'frame-property)
+ (defalias 'make-overlay 'ignore)
+ (defalias 'overlay-end 'ignore)
+ (defalias 'overlay-get 'ignore)
+ (defalias 'overlay-put 'ignore)
+ (defalias 'overlay-start 'ignore)
+ (defalias 'overlays-in 'ignore)
+ (defalias 'replace-dehighlight 'ignore)
+ (defalias 'replace-highlight 'ignore)
+ (defalias 'gnutls-available-p 'ignore)
+ (defvar timer-list nil)
+ (defvar scroll-margin 0)))
+
+(defun dgnushack-emacs-compile-defcustom-p ()
+ "Return non-nil if Emacs byte compiles `defcustom' forms.
+Those Emacsen will warn against undefined variables and functions used
+in `defcustom' forms."
+ (let ((outbuf (with-temp-buffer
+ (insert "(defcustom foo (1+ (random)) \"\" :group 'emacs)\n")
+ (byte-compile-from-buffer (current-buffer) "foo.el"))))
+ (when outbuf
+ (prog1
+ (with-current-buffer outbuf
+ (goto-char (point-min))
+ (search-forward " 'foo '(byte-code " nil t))
+ (kill-buffer outbuf)))))
+
+(when (and (featurep 'xemacs)
+ (dgnushack-emacs-compile-defcustom-p))
+ (maybe-fbind '(defined-colors face-attribute))
+ (maybe-bind '(idna-program installation-directory)))