0
|
1 (setq load-path (append (list (expand-file-name "./")
|
80
|
2 (or (getenv "WIDGETDIR")
|
|
3 (expand-file-name "../widget"))
|
|
4 )
|
0
|
5 load-path))
|
|
6
|
80
|
7 (setq max-specpdl-size (* 10 max-specpdl-size)
|
|
8 max-lisp-eval-depth (* 10 max-lisp-eval-depth))
|
|
9
|
70
|
10 (defun hack-dot-emacs ()
|
|
11 (interactive)
|
|
12 (let* ((args command-line-args-left)
|
|
13 (fname (expand-file-name (nth 0 args)))
|
80
|
14 (lispdir (nth 1 args)))
|
70
|
15 (setq command-line-args-left (cdr (cdr (cdr command-line-args-left))))
|
|
16 (set-buffer (get-buffer-create " *x*"))
|
|
17 (erase-buffer)
|
|
18 (if (file-exists-p fname)
|
|
19 (insert-file-contents fname))
|
|
20 (goto-char (point-min))
|
|
21 (if (search-forward ";;; Emacs-w3 configuration options" nil t)
|
|
22 (message "No changes made.")
|
|
23 (goto-char (point-max))
|
|
24 (insert "\n;;; Emacs-w3 configuration options\n")
|
|
25 (insert "(setq load-path (cons (expand-file-name \""
|
|
26 lispdir "\") load-path))\n")
|
|
27 (insert "(autoload 'w3-preview-this-buffer \"w3\" \"WWW Previewer\" t)\n")
|
|
28 (insert "(autoload 'w3-follow-url-at-point \"w3\" \"Find document at pt\" t)\n")
|
|
29 (insert "(autoload 'w3 \"w3\" \"WWW Browser\" t)\n")
|
|
30 (insert "(autoload 'w3-open-local \"w3\" \"Open local file for WWW browsing\" t)\n")
|
|
31 (insert "(autoload 'w3-fetch \"w3\" \"Open remote file for WWW browsing\" t)\n")
|
|
32 (insert "(autoload 'w3-use-hotlist \"w3\" \"Use shortcuts to view WWW docs\" t)\n")
|
|
33 (insert "(autoload 'w3-show-hotlist \"w3\" \"Use shortcuts to view WWW docs\" t)\n")
|
|
34 (insert "(autoload 'w3-follow-link \"w3\" \"Follow a hypertext link.\" t)\n")
|
|
35 (insert "(autoload 'w3-batch-fetch \"w3\" \"Batch retrieval of URLs\" t)\n")
|
|
36 (insert "(autoload 'url-get-url-at-point \"url\" \"Find the url under the cursor\" nil)\n")
|
|
37 (insert "(autoload 'url-file-attributes \"url\" \"File attributes of a URL\" nil)\n")
|
|
38 (insert "(autoload 'url-popup-info \"url\" \"Get info on a URL\" t)\n")
|
|
39 (insert "(autoload 'url-retrieve \"url\" \"Retrieve a URL\" nil)\n")
|
|
40 (insert "(autoload 'url-buffer-visiting \"url\" \"Find buffer visiting a URL.\" nil)\n")
|
|
41 (insert "(autoload 'gopher-dispatch-object \"gopher\" \"Fetch gopher dir\" t)\n")
|
|
42 (insert ";;; End of Emacs-w3 configuration options\n")
|
|
43 (write-file fname))))
|
14
|
44
|
0
|
45 (defun w3-declare-variables (&rest args)
|
|
46 (while args
|
|
47 (eval (list 'defvar (car args) nil ""))
|
|
48 (setq args (cdr args))))
|
|
49
|
|
50 ;; For Emacs 19
|
|
51 (w3-declare-variables 'track-mouse 'menu-bar-help-menu 'menu-bar-mode)
|
|
52
|
|
53 ;; For XEmacs/Lucid
|
|
54 (w3-declare-variables 'current-menubar 'default-menubar 'extent
|
|
55 'mode-motion-hook 'mode-popup-menu 'sound-alist
|
2
|
56 'menubar-visible-p
|
0
|
57 'inhibit-help-echo 'default-toolbar
|
|
58 'bottom-toolbar-height 'top-toolbar-height
|
|
59 'toolbar-buttons-captioned-p
|
|
60 'right-toolbar-width 'left-toolbar-width
|
|
61 'top-toolbar 'bottom-toolbar 'right-toolbar
|
|
62 'left-toolbar 'device-fonts-cache
|
|
63 'has-modeline-p 'baud-rate)
|
|
64
|
|
65 ;; For MULE
|
|
66 (w3-declare-variables '*noconv* '*autoconv* '*euc-japan* '*internal*
|
2
|
67 'w3-mime-list-for-code-conversion 'lc-ltn1
|
80
|
68 'mule-version 'enable-multibyte-characters
|
|
69 'charset-latin-iso8859-1
|
0
|
70 'file-coding-system-for-read 'file-coding-system)
|
|
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 xpm-button
|
|
78 (w3-declare-variables 'x-library-search-path)
|
|
79
|
|
80 ;; For emacspeak
|
|
81 (w3-declare-variables 'dtk-voice-table 'dtk-punctuation-mode)
|
|
82
|
80
|
83 ;; For a few internal things
|
0
|
84 (w3-declare-variables 'tag 'w3-working-buffer 'proxy-info 'args
|
80
|
85 'w3-image-widgets-waiting 'w3-form-info
|
0
|
86 'w3-last-parse-tree 'command-line-args-left
|
|
87 'standard-display-table 'w3-html-bookmarks
|
80
|
88 'browse-url-browser-function 'widget-keymap)
|
|
89
|
|
90 ;; GNUS
|
|
91 (w3-declare-variables 'gnus-group-buffer 'gnus-version)
|
0
|
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))
|
98
|
104
|
80
|
105 (require 'w3-sysdp)
|
0
|
106 (provide 'ange-ftp)
|