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