annotate lisp/w3/docomp.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children ac2d302a0011
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 (setq load-path (append (list (expand-file-name "./")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 (or (getenv "URLDIR")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 (expand-file-name "../url")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 load-path))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 (defun hack-dot-emacs ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 (let* ((args command-line-args-left)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 (fname (expand-file-name (nth 0 args)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 (lispdir (nth 1 args))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 (urldir (nth 2 args)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 (setq command-line-args-left (cdr (cdr (cdr command-line-args-left))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 (set-buffer (get-buffer-create " *x*"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 (if (file-exists-p fname)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 (insert-file-contents fname))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 (if (search-forward ";;; Emacs-w3 configuration options" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 (message "No changes made.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 (insert "\n;;; Emacs-w3 configuration options\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 (insert "(setq load-path (cons (expand-file-name \""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 lispdir "\") load-path))\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 (insert "(setq load-path (cons (expand-file-name \""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 urldir "\") load-path))\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 (insert "(autoload 'w3-preview-this-buffer \"w3\" \"WWW Previewer\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 (insert "(autoload 'w3-follow-url-at-point \"w3\" \"Find document at pt\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 (insert "(autoload 'w3 \"w3\" \"WWW Browser\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 (insert "(autoload 'w3-open-local \"w3\" \"Open local file for WWW browsing\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (insert "(autoload 'w3-fetch \"w3\" \"Open remote file for WWW browsing\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 (insert "(autoload 'w3-use-hotlist \"w3\" \"Use shortcuts to view WWW docs\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (insert "(autoload 'w3-show-hotlist \"w3\" \"Use shortcuts to view WWW docs\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 (insert "(autoload 'w3-follow-link \"w3\" \"Follow a hypertext link.\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (insert "(autoload 'w3-batch-fetch \"w3\" \"Batch retrieval of URLs\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (insert "(autoload 'url-get-url-at-point \"url\" \"Find the url under the cursor\" nil)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (insert "(autoload 'url-file-attributes \"url\" \"File attributes of a URL\" nil)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (insert "(autoload 'url-popup-info \"url\" \"Get info on a URL\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (insert "(autoload 'url-retrieve \"url\" \"Retrieve a URL\" nil)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (insert "(autoload 'url-buffer-visiting \"url\" \"Find buffer visiting a URL.\" nil)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (insert "(autoload 'gopher-dispatch-object \"gopher\" \"Fetch gopher dir\" t)\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (insert ";;; End of Emacs-w3 configuration options\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (write-file fname))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (defun w3-declare-variables (&rest args)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (while args
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (eval (list 'defvar (car args) nil ""))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (setq args (cdr args))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 ;; For Emacs 19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (w3-declare-variables 'track-mouse 'menu-bar-help-menu 'menu-bar-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;; For XEmacs/Lucid
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (w3-declare-variables 'current-menubar 'default-menubar 'extent
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 'mode-motion-hook 'mode-popup-menu 'sound-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 'inhibit-help-echo 'default-toolbar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 'bottom-toolbar-height 'top-toolbar-height
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 'toolbar-buttons-captioned-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 'right-toolbar-width 'left-toolbar-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 'top-toolbar 'bottom-toolbar 'right-toolbar
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 'left-toolbar 'device-fonts-cache
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 'has-modeline-p 'baud-rate)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; For MULE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (w3-declare-variables '*noconv* '*autoconv* '*euc-japan* '*internal*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 'w3-mime-list-for-code-conversion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 'file-coding-system-for-read 'file-coding-system)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 ;; For Mailcrypt
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (w3-declare-variables 'mc-pgp-path 'mc-pgp-key-begin-line 'mc-ripem-pubkeyfile
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 'mc-default-scheme 'mc-flag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;; For NNTP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (w3-declare-variables 'nntp-server-buffer 'nntp-server-process 'nntp/connection
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 'gnus-nntp-server 'nntp-server-name 'nntp-version
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 'gnus-default-nntp-server)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 ;; For ps-print
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (w3-declare-variables 'ps-bold-faces 'ps-italic-faces 'ps-print-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 ;; For xpm-button
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (w3-declare-variables 'x-library-search-path)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 ;; For emacspeak
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (w3-declare-variables 'dtk-voice-table 'dtk-punctuation-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 ;; For a few intern things
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (w3-declare-variables 'tag 'w3-working-buffer 'proxy-info 'args
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 'w3-image-widgets-waiting
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 'w3-last-parse-tree 'command-line-args-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 'standard-display-table 'w3-html-bookmarks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 'widget-keymap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (load "bytecomp" t t nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 ;; Emacs 19 byte compiler complains about too much stuff by default.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 ;; Turn off most of the warnings here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (setq byte-compile-warnings '(free-vars))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (require 'w3-vars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (require 'url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (require 'mm)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 (and w3-running-FSF19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (< emacs-minor-version 29)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (require 'font))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (load-library "w3-sysdp")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (provide 'ange-ftp)