Make gnus-html work for XEmacs.
[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
15                 url-version w3-meta-charset-content-type-regexp
16                 w3-meta-content-type-charset-regexp))
17
18   (when (<= emacs-major-version 22)
19     (defun ecomplete-add-item (type key text))
20     (defun ecomplete-save nil)
21     (defun hashcash-wait-async (&optional buffer))
22     (defun mail-add-payment (&optional arg async))
23     (defun mail-add-payment-async (&optional arg))
24     (defun netrc-get (alist type))
25     (defun netrc-machine (list machine &optional port defaultport))
26     (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
27                                                 ports defaults))
28     (defun netrc-parse (file))
29     (maybe-fbind
30      '(Info-index
31        Info-index-next Info-menu bbdb-complete-name bookmark-default-handler
32        bookmark-get-bookmark-record bookmark-make-record-default
33        bookmark-prop-get display-time-event-handler epg-check-configuration
34        find-coding-system frame-device recenter-top-bottom
35        rmail-swap-buffers-maybe w3-do-setup w3-parse-buffer w3-prepare-buffer
36        w3-region w32-focus-frame w3m-detect-meta-charset w3m-region))
37     (maybe-bind
38      '(w3m-link-map)))
39
40   (when (= emacs-major-version 21)
41     (defun canlock-insert-header (&optional id-for-key id-for-lock password))
42     (defun split-line (&optional arg))
43     (maybe-fbind
44      '(clear-string
45        coding-system-aliasee coding-system-from-name custom-autoload
46        delete-annotation delete-extent device-connection
47        device-on-window-system-p dfw-device events-to-keys find-face
48        font-lock-set-defaults get-char-table glyph-height glyph-width
49        help-buffer int-to-char ldap-search-entries mail-aliases-setup
50        make-annotation make-event make-glyph make-network-process map-extents
51        message-xmas-redefine put-char-table run-mode-hooks set-extent-property
52        set-itimer-function set-keymap-default-binding temp-directory
53        time-to-seconds ucs-to-char unicode-precedence-list unicode-to-char
54        url-generic-parse-url url-http-file-exists-p
55        valid-image-instantiator-format-p vcard-pretty-print
56        w3-coding-system-for-mime-charset window-pixel-edges window-pixel-height
57        window-pixel-width))
58     (maybe-bind
59      '(completion-styles
60        eudc-protocol filladapt-mode help-echo-owns-message itimer-list
61        ps-print-color-p smtpmail-default-smtp-server
62        w3-meta-charset-content-type-regexp
63        w3-meta-content-type-charset-regexp))))
64
65 (when (featurep 'xemacs)
66   (defun canlock-insert-header (&optional id-for-key id-for-lock password))
67   (defun ecomplete-add-item (type key text))
68   (defun ecomplete-save nil)
69   (defun hashcash-wait-async (&optional buffer))
70   (defun mail-add-payment (&optional arg async))
71   (defun mail-add-payment-async (&optional arg))
72   (defun netrc-get (alist type))
73   (defun netrc-machine (list machine &optional port defaultport))
74   (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
75                                               ports defaults))
76   (defun netrc-parse (file))
77   (defun split-line (&optional arg))
78   (eval-after-load "rmail"
79     '(defun rmail-toggle-header (&optional arg)))
80   (maybe-fbind
81    '(bookmark-default-handler
82      bookmark-get-bookmark-record bookmark-make-record-default
83      bookmark-prop-get clear-string codepage-setup coding-system-from-name
84      cp-supported-codepages create-image delete-overlay detect-coding-string
85      display-time-event-handler epg-check-configuration event-click-count
86      event-end event-start find-coding-systems-for-charsets
87      find-coding-systems-region find-coding-systems-string find-image
88      float-time help-buffer image-size image-type-available-p insert-image
89      mail-abbrevs-setup make-mode-line-mouse-map make-network-process
90      mouse-minibuffer-check mouse-movement-p mouse-scroll-subr overlay-lists
91      pgg-display-output-buffer posn-point posn-window put-image read-event
92      recenter-top-bottom rmail-msg-restore-non-pruned-header
93      rmail-swap-buffers-maybe select-safe-coding-system sort-coding-systems
94      track-mouse ucs-to-char url-generic-parse-url url-http-file-exists-p
95      url-insert-file-contents vcard-pretty-print w3-parse-buffer
96      w3m-detect-meta-charset w3m-region window-edges))
97   (maybe-bind
98    '(adaptive-fill-first-line-regexp
99      buffer-display-table completion-styles cursor-in-non-selected-windows
100      default-enable-multibyte-characters default-file-name-coding-system
101      eudc-protocol filladapt-mode gnus-agent-expire-current-dirs
102      help-xref-stack-item idna-program installation-directory line-spacing
103      mark-active mouse-selection-click-count mouse-selection-click-count-buffer
104      ps-print-color-p rmail-default-file rmail-default-rmail-file
105      rmail-insert-mime-forwarded-message-function show-trailing-whitespace
106      smtpmail-default-smtp-server temporary-file-directory tool-bar-mode
107      transient-mark-mode url-version w3-meta-charset-content-type-regexp
108      w3m-link-map w3-meta-content-type-charset-regexp))
109
110   (when (or (and (= emacs-major-version 21) (= emacs-minor-version 4))
111             (featurep 'sxemacs))
112     (maybe-fbind
113      '(custom-autoload
114        decode-char display-graphic-p display-images-p display-visual-class
115        get-display-table make-temp-file next-single-char-property-change
116        put-display-table select-frame-set-input-focus set-buffer-multibyte
117        string-as-multibyte timer-set-function unicode-precedence-list
118        unicode-to-char w32-focus-frame x-focus-frame))
119     (maybe-bind
120      '(header-line-format
121        scroll-margin timer-list)))
122
123   (when (and (= emacs-major-version 21) (= emacs-minor-version 4))
124     (maybe-fbind
125      '(propertize)))
126
127   (unless (featurep 'mule)
128     (maybe-fbind
129      '(ccl-execute-on-string
130        char-charset charsetp coding-system-get find-charset-region
131        get-charset-property pgg-display-output-buffer pgg-parse-crc24-string
132        unicode-precedence-list))
133     (maybe-bind
134      '(current-language-environment
135        language-info-alist pgg-parse-crc24)))
136
137   (unless (featurep 'file-coding)
138     (maybe-fbind
139      '(coding-system-aliasee
140        coding-system-base coding-system-change-eol-conversion coding-system-list
141        coding-system-p decode-coding-region decode-coding-string
142        detect-coding-region encode-coding-region encode-coding-string
143        find-coding-system))
144     (maybe-bind
145      '(buffer-file-coding-system
146        coding-system-for-read coding-system-for-write
147        enable-multibyte-characters file-name-coding-system))))
148
149 (provide 'lpath)