Fbind ns-focus-frame for Emacs 21, 22, XEmacs 21.4, and SXEmacs.
[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 ns-focus-frame
24        w3-do-setup w3-prepare-buffer w3-region w32-focus-frame
25        w3m-detect-meta-charset 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 ns-focus-frame put-display-table
83        select-frame-set-input-focus unicode-precedence-list w32-focus-frame
84        x-focus-frame))
85     (maybe-bind
86      '(default-file-name-coding-system)))
87
88   (when (and (= emacs-major-version 21) (= emacs-minor-version 4))
89     (maybe-fbind
90      '(propertize)))
91
92   (unless (featurep 'mule)
93     (maybe-fbind
94      '(ccl-execute-on-string
95        charsetp coding-system-get get-charset-property
96        pgg-display-output-buffer pgg-parse-crc24-string
97        unicode-precedence-list))
98     (maybe-bind
99      '(current-language-environment
100        default-file-name-coding-system language-info-alist pgg-parse-crc24)))
101
102   (unless (featurep 'file-coding)
103     (maybe-fbind
104      '(coding-system-base
105        coding-system-change-eol-conversion coding-system-list coding-system-p
106        find-coding-system))
107     (maybe-bind
108      '(buffer-file-coding-system
109        coding-system-for-read coding-system-for-write
110        enable-multibyte-characters file-name-coding-system))))
111
112 (provide 'lpath)
113
114 ;;; arch-tag: d1ad864f-dca6-4d21-aa3f-be3248e66dba