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