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