+(eval-and-compile
+ (when (featurep 'xemacs)
+ (unless (fboundp 'defadvice)
+ (autoload 'defadvice "advice" nil nil 'macro))
+ (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)
+ (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 'pgg-snarf-keys-region "pgg" nil t)
+ (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 (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)
+ (autoload 'w3-do-setup "w3")
+ (autoload 'w3-prepare-buffer "w3-display")
+ (autoload 'w3-region "w3-display" 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 'w3-coding-system-for-mime-charset 'ignore)))
+
+(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 (dgnushack-emacs-compile-defcustom-p)
+ (maybe-fbind '(defined-colors face-attribute))
+ (maybe-bind '(idna-program installation-directory)))
+
+(defun dgnushack-compile-verbosely ()
+ "Call dgnushack-compile with warnings ENABLED. If you are compiling
+patches to gnus, you should consider modifying make.bat to call
+dgnushack-compile-verbosely. All other users should continue to use
+dgnushack-compile."
+ (dgnushack-compile t))
+