No need to fbind codepage-setup for Emacs 23.
[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 nnkiboze-score-file (a))
20     (maybe-fbind
21      '(Info-index
22        Info-index-next Info-menu bbdb-complete-name display-time-event-handler
23        epg-check-configuration find-coding-system frame-device w3-do-setup
24        w3-prepare-buffer w3-region w32-focus-frame w3m-detect-meta-charset
25        w3m-region)))
26
27   (when (= emacs-major-version 21)
28     (defun split-line (&optional arg))
29     (maybe-fbind
30      '(clear-string
31        custom-autoload delete-annotation delete-extent device-connection
32        dfw-device events-to-keys find-face font-lock-set-defaults
33        get-char-table glyph-height glyph-width help-buffer ldap-search-entries
34        mail-aliases-setup make-annotation make-event make-glyph
35        make-network-process map-extents message-xmas-redefine put-char-table
36        run-mode-hooks set-extent-property set-itimer-function
37        set-keymap-default-binding temp-directory unicode-precedence-list
38        url-generic-parse-url url-http-file-exists-p
39        valid-image-instantiator-format-p vcard-pretty-print
40        w3-coding-system-for-mime-charset window-pixel-height
41        window-pixel-width))
42     (maybe-bind
43      '(eudc-protocol
44        filladapt-mode help-echo-owns-message itimer-list ps-print-color-p
45        w3-meta-charset-content-type-regexp
46        w3-meta-content-type-charset-regexp))))
47
48 (when (featurep 'xemacs)
49   (defun nnkiboze-score-file (a))
50   (defun split-line (&optional arg))
51   (maybe-fbind
52    '(clear-string
53      codepage-setup create-image detect-coding-string
54      display-time-event-handler epg-check-configuration event-click-count
55      event-end event-start find-coding-systems-for-charsets
56      find-coding-systems-region find-coding-systems-string find-image
57      help-buffer image-size image-type-available-p insert-image
58      mail-abbrevs-setup make-mode-line-mouse-map make-network-process
59      mouse-minibuffer-check mouse-movement-p mouse-scroll-subr
60      pgg-display-output-buffer posn-point posn-window put-image read-event
61      select-safe-coding-system sort-coding-systems track-mouse
62      url-generic-parse-url url-http-file-exists-p url-insert-file-contents
63      vcard-pretty-print w3m-detect-meta-charset w3m-region window-edges))
64   (maybe-bind
65    '(adaptive-fill-first-line-regexp
66      buffer-display-table cursor-in-non-selected-windows
67      default-enable-multibyte-characters eudc-protocol
68      filladapt-mode gnus-agent-expire-current-dirs
69      help-xref-stack-item idna-program installation-directory
70      line-spacing mark-active mouse-selection-click-count
71      mouse-selection-click-count-buffer ps-print-color-p
72      rmail-insert-mime-forwarded-message-function
73      show-trailing-whitespace tool-bar-mode transient-mark-mode
74      url-version w3-meta-charset-content-type-regexp
75      w3-meta-content-type-charset-regexp))
76
77   (when (or (and (= emacs-major-version 21) (= emacs-minor-version 4))
78             (featurep 'sxemacs))
79     (maybe-fbind
80      '(custom-autoload
81        display-graphic-p display-images-p display-visual-class
82        get-display-table put-display-table select-frame-set-input-focus
83        unicode-precedence-list w32-focus-frame x-focus-frame))
84     (maybe-bind
85      '(default-file-name-coding-system scroll-margin)))
86
87   (when (and (= emacs-major-version 21) (= emacs-minor-version 4))
88     (maybe-fbind
89      '(propertize)))
90
91   (unless (featurep 'mule)
92     (maybe-fbind
93      '(ccl-execute-on-string
94        charsetp coding-system-get get-charset-property
95        pgg-display-output-buffer pgg-parse-crc24-string
96        unicode-precedence-list))
97     (maybe-bind
98      '(current-language-environment
99        default-file-name-coding-system language-info-alist pgg-parse-crc24)))
100
101   (unless (featurep 'file-coding)
102     (maybe-fbind
103      '(coding-system-base
104        coding-system-change-eol-conversion coding-system-list coding-system-p
105        find-coding-system))
106     (maybe-bind
107      '(buffer-file-coding-system
108        coding-system-for-read coding-system-for-write
109        enable-multibyte-characters file-name-coding-system))))
110
111 (provide 'lpath)
112
113 ;;; arch-tag: d1ad864f-dca6-4d21-aa3f-be3248e66dba