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