Allow bookmarks to be set from Gnus Article buffers (Bug #5975).
[gnus] / lisp / lpath.el
index 1bc8013..2cab505 100644 (file)
@@ -1,7 +1,5 @@
 ;; Shut up.
 
-(defvar byte-compile-default-warnings)
-
 (defun maybe-fbind (args)
   (while args
     (or (fboundp (car args))
 (defun maybe-bind (args)
   (mapcar (lambda (var) (unless (boundp var) (set var nil))) args))
 
-(maybe-fbind '(babel-fetch
-              babel-wash create-image decode-coding-string display-graphic-p
-              replace-regexp-in-string
-              bbdb-complete-name
-              display-time-event-handler
-              find-image font-create-object gnus-mule-get-coding-system
-              font-lock-set-defaults
-              find-coding-systems-string
-              image-size image-type-available-p insert-image
-              image-type-from-file-header
-              make-symbolic-link
-              make-temp-file message-xmas-redefine
-              mail-abbrev-in-expansion-header-p
-              mail-aliases-setup mm-copy-tree
-              mule-write-region-no-coding-system put-image
-              ring-elements
-              charsetp sort-coding-systems
-              coding-system-p coding-system-list
-              propertize make-mode-line-mouse2-map
-              frames-on-display-list
-              make-mode-line-mouse-map
-              rmail-select-summary rmail-summary-exists rmail-update-summary
-              rmail-msg-is-pruned rmail-msg-restore-non-pruned-header
-              sc-cite-regexp set-font-family set-font-size temp-directory
-              string-as-multibyte
-              tool-bar-add-item tool-bar-add-item-from-menu
-              unix-sync
-              url-view-url vcard-pretty-print
-              url-insert-file-contents
-              w3-coding-system-for-mime-charset w3-prepare-buffer w3-region
-              w3m-charset-to-coding-system w3m-region
-              widget-make-intangible x-defined-colors))
+(unless (featurep 'xemacs)
+  (maybe-fbind '(pgg-display-output-buffer url-generic-parse-url))
+  (maybe-bind '(bookmark-current-buffer
+               bookmark-yank-point help-xref-stack-item url-version
+               w3-meta-charset-content-type-regexp
+               w3-meta-content-type-charset-regexp))
+
+  (when (>= emacs-major-version 22)
+    (maybe-bind '(bookmark-make-record-function)))
+
+  (when (<= emacs-major-version 22)
+    (defun ecomplete-add-item (type key text))
+    (defun ecomplete-save nil)
+    (defun hashcash-wait-async (&optional buffer))
+    (defun mail-add-payment (&optional arg async))
+    (defun mail-add-payment-async (&optional arg))
+    (defun netrc-get (alist type))
+    (defun netrc-machine (list machine &optional port defaultport))
+    (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
+                                               ports defaults))
+    (defun netrc-parse (file))
+    (defun nnkiboze-score-file (a))
+    (maybe-fbind
+     '(Info-index
+       Info-index-next Info-menu bbdb-complete-name bookmark-default-handler
+       bookmark-get-bookmark-record bookmark-make-record-default
+       bookmark-prop-get display-time-event-handler epg-check-configuration
+       find-coding-system frame-device recenter-top-bottom
+       rmail-swap-buffers-maybe w3-do-setup w3-prepare-buffer w3-region
+       w32-focus-frame w3m-detect-meta-charset w3m-region))
+    (maybe-bind
+     '(w3m-link-map)))
 
-(maybe-bind '(adaptive-fill-first-line-regexp
-             adaptive-fill-regexp babel-history babel-translations
-             default-enable-multibyte-characters
-             enable-multibyte-characters
-             display-time-mail-function imap-password mail-mode-hook
-             filladapt-mode
-             mc-pgp-always-sign
-             gnus-message-group-art
-             gpg-unabbrev-trust-alist
-             nnoo-definition-alist
-             current-language-environment
-             language-info-alist
-             url-current-callback-func url-be-asynchronous
-             url-current-callback-data url-working-buffer
-             url-current-mime-headers w3-meta-charset-content-type-regexp
-             rmail-enable-mime-composing
-             rmail-insert-mime-forwarded-message-function
-             w3-meta-content-type-charset-regexp
-             w3m-cid-retrieve-function-alist w3m-current-buffer
-             w3m-meta-content-type-charset-regexp w3m-mode-map
-             url-package-version url-package-name))
+  (when (= emacs-major-version 21)
+    (defun canlock-insert-header (&optional id-for-key id-for-lock password))
+    (defun split-line (&optional arg))
+    (maybe-fbind
+     '(clear-string
+       coding-system-aliasee coding-system-from-name custom-autoload
+       delete-annotation delete-extent device-connection dfw-device
+       events-to-keys find-face font-lock-set-defaults get-char-table
+       glyph-height glyph-width help-buffer int-to-char ldap-search-entries
+       mail-aliases-setup make-annotation make-event make-glyph
+       make-network-process map-extents message-xmas-redefine put-char-table
+       run-mode-hooks set-extent-property set-itimer-function
+       set-keymap-default-binding temp-directory time-to-seconds ucs-to-char
+       unicode-precedence-list unicode-to-char url-generic-parse-url
+       url-http-file-exists-p valid-image-instantiator-format-p
+       vcard-pretty-print w3-coding-system-for-mime-charset window-pixel-height
+       window-pixel-width))
+    (maybe-bind
+     '(eudc-protocol
+       filladapt-mode help-echo-owns-message itimer-list ps-print-color-p
+       smtpmail-default-smtp-server w3-meta-charset-content-type-regexp
+       w3-meta-content-type-charset-regexp))))
 
-(if (featurep 'xemacs)
-    (progn
-      (defvar track-mouse nil)
-      (maybe-fbind '(char-charset
-                    coding-system-get compute-motion coordinates-in-window-p
-                    delete-overlay easy-menu-create-keymaps
-                    error-message-string event-click-count event-end
-                    event-start facemenu-add-new-face facemenu-get-face
-                    find-charset-region find-coding-systems-for-charsets
-                    find-coding-systems-region find-non-ascii-charset-region
-                    frame-face-alist get-charset-property internal-find-face
-                    internal-next-face-id mail-abbrevs-setup make-char-table
-                    make-face-internal make-face-x-resource-internal
-                    make-overlay mouse-minibuffer-check mouse-movement-p
-                    mouse-scroll-subr overlay-buffer overlay-end
-                    overlay-get overlay-lists overlay-put
-                    overlays-in
-                    overlay-start posn-point posn-window
-                    read-event read-event run-with-idle-timer
-                    set-buffer-multibyte set-char-table-range
-                    set-face-stipple set-frame-face-alist track-mouse
-                    url-retrieve w3-form-encode-xwfu window-at
-                    window-edges x-color-values x-popup-menu browse-url
-                    frame-char-height frame-char-width
-                    url-generic-parse-url xml-parse-region
-                    make-network-process))
-      (maybe-bind '(buffer-display-table
-                   buffer-file-coding-system font-lock-defaults
-                   global-face-data gnus-article-x-face-too-ugly
-                   gnus-newsgroup-charset gnus-newsgroup-emphasis-alist
-                   gnus-newsgroup-name mark-active
-                   mouse-selection-click-count
-                   mouse-selection-click-count-buffer
-                   temporary-file-directory transient-mark-mode
-                   url-current-mime-type
-                   user-full-name user-login-name
-                   w3-image-mappings)))
-  (maybe-bind '(browse-url-browser-function
-               enable-multibyte-characters help-echo-owns-message))
-  (maybe-fbind '(Info-goto-node
-                add-submenu annotation-glyph annotationp babel-as-string
-                button-press-event-p characterp color-instance-name
-                color-instance-rgb-components color-name delete-annotation
-                device-class device-on-window-system-p device-type
-                display-error event-glyph event-object event-point
-                events-to-keys face-doc-string find-face frame-device
-                frame-property get-popup-menu-response glyph-height
-                glyph-property glyph-width glyphp make-annotation
-                make-event
-                make-color-instance make-extent make-glyph make-gui-button
-                make-image-specifier map-extents next-command-event
-                pp-to-string read-color set-extent-property
-                set-face-doc-string set-glyph-image set-glyph-property
-                specifier-instance url-generic-parse-url
-                valid-image-instantiator-format-p w3-do-setup
-                window-pixel-height window-pixel-width
-                xml-parse-region make-network-process)))
+(when (featurep 'xemacs)
+  (defun canlock-insert-header (&optional id-for-key id-for-lock password))
+  (defun ecomplete-add-item (type key text))
+  (defun ecomplete-save nil)
+  (defun hashcash-wait-async (&optional buffer))
+  (defun mail-add-payment (&optional arg async))
+  (defun mail-add-payment-async (&optional arg))
+  (defun netrc-get (alist type))
+  (defun netrc-machine (list machine &optional port defaultport))
+  (defun netrc-machine-user-or-password (mode authinfo-file-or-list machines
+                                             ports defaults))
+  (defun netrc-parse (file))
+  (defun nnkiboze-score-file (a))
+  (defun split-line (&optional arg))
+  (eval-after-load "rmail"
+    '(defun rmail-toggle-header (&optional arg)))
+  (maybe-fbind
+   '(bookmark-default-handler
+     bookmark-get-bookmark-record bookmark-make-record-default
+     bookmark-prop-get clear-string codepage-setup coding-system-from-name
+     cp-supported-codepages create-image delete-overlay detect-coding-string
+     display-time-event-handler epg-check-configuration event-click-count
+     event-end event-start find-coding-systems-for-charsets
+     find-coding-systems-region find-coding-systems-string find-image
+     float-time help-buffer image-size image-type-available-p insert-image
+     mail-abbrevs-setup make-mode-line-mouse-map make-network-process
+     mouse-minibuffer-check mouse-movement-p mouse-scroll-subr overlay-lists
+     pgg-display-output-buffer posn-point posn-window put-image read-event
+     recenter-top-bottom rmail-msg-restore-non-pruned-header
+     rmail-swap-buffers-maybe select-safe-coding-system sort-coding-systems
+     track-mouse ucs-to-char url-generic-parse-url url-http-file-exists-p
+     url-insert-file-contents vcard-pretty-print w3m-detect-meta-charset
+     w3m-region window-edges))
+  (maybe-bind
+   '(adaptive-fill-first-line-regexp
+     bookmark-current-buffer bookmark-yank-point buffer-display-table
+     cursor-in-non-selected-windows default-enable-multibyte-characters
+     default-file-name-coding-system eudc-protocol filladapt-mode
+     gnus-agent-expire-current-dirs help-xref-stack-item idna-program
+     installation-directory line-spacing mark-active
+     mouse-selection-click-count mouse-selection-click-count-buffer
+     ps-print-color-p rmail-default-file rmail-default-rmail-file
+     rmail-insert-mime-forwarded-message-function show-trailing-whitespace
+     smtpmail-default-smtp-server temporary-file-directory tool-bar-mode
+     transient-mark-mode url-version w3-meta-charset-content-type-regexp
+     w3m-link-map w3-meta-content-type-charset-regexp))
 
-(require 'custom)
+  (when (or (and (= emacs-major-version 21) (= emacs-minor-version 4))
+           (featurep 'sxemacs))
+    (maybe-fbind
+     '(custom-autoload
+       decode-char display-graphic-p display-images-p display-visual-class
+       get-display-table make-temp-file next-single-char-property-change
+       put-display-table select-frame-set-input-focus set-buffer-multibyte
+       string-as-multibyte timer-set-function unicode-precedence-list
+       unicode-to-char w32-focus-frame x-focus-frame))
+    (maybe-bind
+     '(scroll-margin
+       timer-list)))
 
-(defun md5 (a &optional b c)
-  )
+  (when (and (= emacs-major-version 21) (= emacs-minor-version 4))
+    (maybe-fbind
+     '(propertize)))
 
-(defun nnkiboze-score-file (a)
-)
+  (unless (featurep 'mule)
+    (maybe-fbind
+     '(ccl-execute-on-string
+       char-charset charsetp coding-system-get find-charset-region
+       get-charset-property pgg-display-output-buffer pgg-parse-crc24-string
+       unicode-precedence-list))
+    (maybe-bind
+     '(current-language-environment
+       language-info-alist pgg-parse-crc24)))
+
+  (unless (featurep 'file-coding)
+    (maybe-fbind
+     '(coding-system-aliasee
+       coding-system-base coding-system-change-eol-conversion coding-system-list
+       coding-system-p decode-coding-region decode-coding-string
+       detect-coding-region encode-coding-region encode-coding-string
+       find-coding-system))
+    (maybe-bind
+     '(buffer-file-coding-system
+       coding-system-for-read coding-system-for-write
+       enable-multibyte-characters file-name-coding-system))))
 
 (provide 'lpath)
+
+;;; arch-tag: d1ad864f-dca6-4d21-aa3f-be3248e66dba