Gnus -- minor build / warning fixes [OK For Upstream]
[gnus] / lisp / lpath.el
1 ;; Shut up.
2
3 (defun maybe-fbind (args)
4   (while args
5     (or (fboundp (car args))
6         (defalias (car args) 'ignore))
7     (setq args (cdr args))))
8
9 (defun maybe-bind (args)
10   (mapcar (lambda (var) (unless (boundp var) (set var nil))) args))
11
12 (unless (featurep 'xemacs)
13   (maybe-fbind '(pgg-display-output-buffer url-generic-parse-url))
14   (maybe-bind '(help-xref-stack-item url-version))
15
16   (when (<= emacs-major-version 23)
17     (maybe-bind '(mail-encode-mml syntax-propertize-function)))
18
19   (when (<= emacs-major-version 22)
20     (defun ecomplete-add-item (type key text))
21     (defun ecomplete-save nil)
22     (defun hashcash-wait-async (&optional buffer))
23     (defun mail-add-payment (&optional arg async))
24     (defun mail-add-payment-async (&optional arg))
25     (defun netrc-get (alist type))
26     (defun netrc-machine (list machine &optional port defaultport))
27     (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
28                                                 ports defaults))
29     (defun netrc-parse (file))
30     (defun shr-put-image (data alt &optional flags))
31     (maybe-fbind
32      '(Info-index
33        Info-index-next Info-menu bbdb-complete-name bookmark-default-handler
34        bookmark-get-bookmark-record bookmark-make-record-default
35        bookmark-prop-get completion-at-point display-time-event-handler
36        epg-check-configuration find-coding-system frame-device gnutls-negotiate
37        libxml-parse-html-region recenter-top-bottom rmail-swap-buffers-maybe
38        shr-insert-document w3m-detect-meta-charset w3m-region))
39     (maybe-bind
40      '(epa-file-encrypt-to w3m-link-map))))
41
42 (when (featurep 'xemacs)
43   (defun canlock-insert-header (&optional id-for-key id-for-lock password))
44   (defun ecomplete-add-item (type key text))
45   (defun ecomplete-save nil)
46   (defun gnus-html-prefetch-images (summary))
47   (defun hashcash-wait-async (&optional buffer))
48   (defun mail-add-payment (&optional arg async))
49   (defun mail-add-payment-async (&optional arg))
50   (defun netrc-get (alist type))
51   (defun netrc-machine (list machine &optional port defaultport))
52   (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
53                                               ports defaults))
54   (defun netrc-parse (file))
55   (defun split-line (&optional arg))
56   (defun shr-put-image (data alt &optional flags))
57   (eval-after-load "rmail"
58     '(defun rmail-toggle-header (&optional arg)))
59   (maybe-fbind
60    '(beginning-of-visual-line
61      bookmark-default-handler bookmark-get-bookmark-record
62      bookmark-make-record-default bookmark-prop-get clear-string codepage-setup
63      coding-system-from-name completion-at-point cp-supported-codepages
64      create-image debbugs-gnu cursor-sensor-mode detect-coding-string
65      display-time-event-handler epg-check-configuration event-click-count
66      event-end event-start find-coding-systems-for-charsets
67      find-coding-systems-region find-coding-systems-string find-image
68      float-time gnutls-negotiate font-lock-ensure font-lock-flush help-buffer
69      ido-completing-read image-size image-type-available-p insert-image
70      jka-compr-get-compression-info jka-compr-info-uncompress-args
71      jka-compr-info-uncompress-message jka-compr-info-uncompress-program
72      jka-compr-installed-p jka-compr-make-temp-name libxml-parse-html-region
73      mail-abbrevs-setup make-mode-line-mouse-map make-network-process make-term
74      mouse-minibuffer-check mouse-movement-p mouse-scroll-subr
75      pgg-display-output-buffer posn-point posn-window process-type put-image
76      read-char-choice read-event recenter-top-bottom
77      rmail-msg-restore-non-pruned-header rmail-swap-buffers-maybe
78      select-safe-coding-system set-network-process-option shr-insert-document
79      sort-coding-systems spam-initialize string-to-syntax term-char-mode
80      term-mode track-mouse ucs-to-char url-generic-parse-url
81      url-insert-file-contents vcard-pretty-print w3m-detect-meta-charset
82      w3m-region window-edges network-interface-list))
83   (maybe-bind
84    '(adaptive-fill-first-line-regexp
85      buffer-display-table buffer-save-without-query completion-styles
86      completion-styles-alist cursor-in-non-selected-windows cursor-sensor-mode
87      default-enable-multibyte-characters default-file-name-coding-system
88      epa-file-encrypt-to eudc-protocol filladapt-mode
89      gnus-agent-expire-current-dirs help-xref-stack-item idna-program
90      installation-directory iswitchb-mode iswitchb-temp-buflist line-spacing
91      mail-encode-mml mark-active mouse-selection-click-count
92      mouse-selection-click-count-buffer ps-print-color-p rmail-default-file
93      rmail-default-rmail-file rmail-insert-mime-forwarded-message-function
94      show-trailing-whitespace smtpmail-default-smtp-server
95      temporary-file-directory tool-bar-mode transient-mark-mode url-version
96      w3m-link-map))
97
98   (when (or (and (= emacs-major-version 21) (= emacs-minor-version 4))
99             (featurep 'sxemacs))
100     (maybe-fbind
101      '(current-idle-time
102        custom-autoload decode-char display-graphic-p display-images-p
103        display-visual-class get-display-table help-function-arglist
104        make-temp-file next-single-char-property-change put-display-table
105        select-frame-set-input-focus set-buffer-multibyte set-char-table-range
106        string-as-multibyte timer-set-function unicode-precedence-list
107        unicode-to-char))
108     (maybe-bind
109      '(header-line-format
110        scroll-margin timer-list)))
111
112   (unless (featurep 'mule)
113     (maybe-fbind
114      '(ccl-execute-on-string
115        char-charset charsetp coding-system-get find-charset-region
116        get-charset-property pgg-display-output-buffer unicode-precedence-list))
117     (maybe-bind
118      '(current-language-environment
119        language-info-alist)))
120
121   (unless (featurep 'file-coding)
122     (maybe-fbind
123      '(coding-system-aliasee
124        coding-system-base coding-system-change-eol-conversion coding-system-list
125        coding-system-p decode-coding-region decode-coding-string
126        detect-coding-region encode-coding-region encode-coding-string
127        find-coding-system))
128     (maybe-bind
129      '(buffer-file-coding-system
130        coding-system-for-read coding-system-for-write
131        enable-multibyte-characters file-name-coding-system))))
132
133 (provide 'lpath)