0
|
1 ;;; w3-vars.el,v --- All variable definitions for emacs-w3
|
|
2 ;; Author: wmperry
|
20
|
3 ;; Created: 1997/02/09 06:46:59
|
|
4 ;; Version: 1.82
|
0
|
5 ;; Keywords: comm, help, hypermedia
|
|
6
|
|
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2
|
8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu)
|
16
|
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
|
0
|
10 ;;;
|
14
|
11 ;;; This file is part of GNU Emacs.
|
0
|
12 ;;;
|
|
13 ;;; GNU Emacs is free software; you can redistribute it and/or modify
|
|
14 ;;; it under the terms of the GNU General Public License as published by
|
|
15 ;;; the Free Software Foundation; either version 2, or (at your option)
|
|
16 ;;; any later version.
|
|
17 ;;;
|
|
18 ;;; GNU Emacs is distributed in the hope that it will be useful,
|
|
19 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
21 ;;; GNU General Public License for more details.
|
|
22 ;;;
|
|
23 ;;; You should have received a copy of the GNU General Public License
|
14
|
24 ;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
25 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
26 ;;; Boston, MA 02111-1307, USA.
|
0
|
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
28
|
|
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
30 ;;; Variable definitions for w3
|
|
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
32 (defconst w3-version-number
|
20
|
33 (let ((x "p3.0.56"))
|
0
|
34 (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x)
|
|
35 (setq x (substring x (match-beginning 1) (match-end 1)))
|
|
36 (setq x (substring x 1)))
|
|
37 (mapconcat
|
|
38 (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x ""))
|
|
39 "Version # of w3-mode.")
|
|
40
|
20
|
41 (defconst w3-version-date (let ((x "1997/02/09 06:46:59"))
|
0
|
42 (if (string-match "Date: \\([^ \t\n]+\\)" x)
|
|
43 (substring x (match-beginning 1) (match-end 1))
|
|
44 x))
|
|
45 "Date this version of w3-mode was released.")
|
|
46
|
|
47 (defconst w3-version
|
|
48 (format "WWW %s %s" w3-version-number w3-version-date)
|
|
49 "More descriptive version of w3-version-number.")
|
|
50
|
|
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
52 ;;; General configuration variables
|
|
53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
54 (defvar w3-auto-image-alt t
|
|
55 "*Whether emacs-w3 should create an alt attribute for an image that
|
|
56 is missing it.
|
|
57 If nil, emacs-w3 will not automatically create an ALT attribute.
|
|
58 If t, the alt attribute will be [IMAGE(nameofimage)]
|
|
59 If a string, it should be a string suitable for running through format,
|
|
60 with only one %s, which will be replaced with just the filename of the
|
|
61 graphic that is not loaded.")
|
|
62
|
|
63 (defvar w3-configuration-directory "~/.w3/"
|
|
64 "*Where emacs-w3 can find its configuration files")
|
|
65
|
|
66 (defvar w3-debug-html nil "*Whether to gripe about bad HTML or not.")
|
|
67
|
|
68 (defvar w3-debug-buffer "*HTML Debug*"
|
|
69 "*Name of buffer to store debugging information in.")
|
|
70
|
|
71 (defvar w3-default-configuration-file nil
|
|
72 "*Where per-user customizations of w3 are kept.")
|
|
73
|
|
74 (defvar w3-default-action 'w3-prepare-buffer
|
|
75 "*A lisp symbol specifying what action to take for files with
|
|
76 extensions that are not mapped to a MIME type in `mm-mime-extensions'.
|
|
77 This is useful in case you ever run across files with weird extensions
|
|
78 \(.foo, .README, .READMEFIRST, etc). This should not be required
|
|
79 anymore.
|
|
80
|
|
81 Possible values: any lisp symbol. Should be a function that takes no
|
|
82 arguments. The return value does not matter, it is ignored. Some examples
|
|
83 are:
|
|
84
|
|
85 Action Value
|
|
86 ----------------------------------------------
|
|
87 Parse as HTML 'w3-prepare-buffer
|
|
88 View as text 'indented-text-mode")
|
|
89
|
|
90 (defvar w3-default-homepage nil
|
|
91 "*The url to open at startup. It can be any valid URL. This will
|
|
92 default to the environment variable WWW_HOME if you do not set it in
|
|
93 your .emacs file. If WWW_HOME is undefined, then it will default to
|
|
94 the hypertext documentation for W3 at Indiana University.")
|
|
95
|
|
96 (defvar w3-default-stylesheet nil
|
|
97 "*The filename of the users default stylesheet.")
|
|
98
|
|
99 (defvar w3-do-blinking nil
|
|
100 "*Whether emacs-w3 should display blinking text.")
|
|
101
|
|
102 (defvar w3-do-incremental-display nil
|
|
103 "*Whether to do incremental display of pages or not.")
|
|
104
|
|
105 (defvar w3-documents-menu-file nil
|
|
106 "*Where the Mosaic documents-menu file is located. This is a file
|
|
107 that has extra menus for the 'Navigate' menu. This should be in the same
|
|
108 format as the Mosaic extra documents.menu.")
|
|
109
|
|
110 (defvar w3-dump-to-disk nil
|
|
111 "*If non-nil, all W3 pages loaded will be dumped to disk.")
|
|
112
|
16
|
113 (defvar w3-echo-link '(title url text name)
|
|
114 "*Whether to display the URL of a link when tabbing through links.
|
|
115 Value is a list of one or more of the following symbols:
|
0
|
116
|
16
|
117 url == url of the target
|
|
118 text == text of the link
|
|
119 title == title attribute of the link
|
|
120 name == name or id attribute of the link
|
|
121
|
|
122 If none of the information is available, nothing will be shown for the link
|
|
123 in menus, etc.")
|
0
|
124
|
|
125 (defvar w3-horizontal-rule-char ?-
|
|
126 "*The character to use to create a horizontal rule.
|
|
127 Must be the character's code, not a string. This character is
|
|
128 replicated across the screen to create a division.")
|
|
129
|
16
|
130 (defvar w3-fetch-with-default t
|
|
131 "*Whether `w3-fetch' should determine a good starting URL as a default.")
|
|
132
|
0
|
133 (defvar w3-hotlist-file nil
|
|
134 "*Hotlist filename.
|
|
135 This should be the name of a file that is stored in either
|
|
136 NCSA's Mosaic/X or Netscape/X format. It is used to keep a listing
|
|
137 of commonly accessed URL's without having to go through 20 levels of
|
|
138 menus to get to them.")
|
|
139
|
|
140 (defvar w3-icon-directory "http://cs.indiana.edu/elisp/w3/icons/"
|
|
141 "*Where to find standard icons. Must end in a /!")
|
|
142
|
|
143 (defvar w3-icon-format 'xbm
|
|
144 "*What file extension icons end in. This is a symbol, string, or nil.
|
|
145 If nil, then no file extension is used.")
|
|
146
|
|
147 (defvar w3-indent-level 4
|
|
148 "*Default # of spaces to indent instead of using TABs. This is
|
|
149 necessary to preserve tabs in PRE segments yet still get smaller
|
|
150 indentation for lists, etc.")
|
|
151
|
|
152 (defvar w3-keep-old-buffers t
|
|
153 "*Whether to keep old buffers around when following links.")
|
|
154
|
|
155 (defvar w3-latex-docstyle "{article}"
|
|
156 "*The documentstyle to use when printing/mailing converted HTML
|
|
157 files in LaTeX. Good defaults are:
|
|
158 {article}, [psfig,twocolumn]{article}, etc.")
|
|
159
|
|
160 (defvar w3-link-info-display-function nil
|
|
161 "*A function to call to get extra information about a link and
|
|
162 include it in a buffer. Will be placed after the link and any other
|
|
163 delimiters.")
|
|
164
|
|
165 (defvar w3-mail-command 'mail
|
|
166 "*This function will be called whenever w3 needs to send mail. It should
|
|
167 enter a mail-mode-like buffer in the current window.
|
|
168 `w3-mail-other-window-command' will be used if w3-mutable-windows is t.
|
|
169 The commands `mail-to' and `mail-subject' should still work in this
|
|
170 buffer, and it should use mail-header-separator if possible.")
|
|
171
|
|
172 (defvar w3-mail-other-window-command 'mail-other-window
|
|
173 "*This function will be called whenever w3 needs to send mail in
|
|
174 another window. It should enter a mail-mode-like buffer in a
|
|
175 different window. The commands `mail-to' and `mail-subject' should still
|
|
176 work in this buffer, and it should use mail-header-separator if
|
|
177 possible.")
|
|
178
|
|
179 (defvar w3-max-inlined-image-size nil
|
|
180 "*The maximum byte size of a file to transfer as an inlined image.
|
|
181 If an image is being retrieved and exceeds this size, then it will be
|
|
182 cancelled. This works best on HTTP/1.0 servers that send a
|
|
183 Content-length header, otherwise the image is retrieved up until the
|
|
184 max number of bytes is retrieved, then killed.")
|
|
185
|
|
186 (defvar w3-max-menu-length 35
|
|
187 "*The maximum length of a pulldown menu before it will be split into
|
|
188 smaller chunks, with the first part as a submenu, followed by the rest
|
|
189 of the menu.")
|
|
190
|
|
191 (defvar w3-max-menu-width 40 "*The maximum width of a pulldown menu choice.")
|
|
192
|
|
193 (defvar w3-modeline-format
|
|
194 '(" " ("W3"
|
|
195 (w3-netscape-emulation-minor-mode
|
|
196 " (NS)")
|
|
197 (w3-lynx-emulation-minor-mode
|
|
198 " (Lynx)")
|
|
199 ": "
|
|
200 (40 (-40 "%b"))
|
|
201 " "
|
|
202 (w3-current-isindex "[Searchable] ")
|
|
203 "%p" " " global-mode-string))
|
|
204 "*The modeline format string when in w3 mode")
|
|
205
|
|
206 (defvar w3-mule-attribute 'underline
|
|
207 "*How to highlight items in Mule (Multi-Linugual Emacs).")
|
|
208
|
|
209 (defvar w3-mutable-windows nil
|
|
210 "*Controls how new WWW documents are displayed. If this is set to
|
|
211 non-nil and pop-up-windows is non-nil, then new buffers will be shown
|
|
212 in another window. If either is nil, then it will replace the document
|
|
213 in the current window.")
|
|
214
|
|
215 (defvar w3-netscape-configuration-file nil
|
|
216 "*A Netscape-for-X style configuration file. This file will only be read if
|
|
217 and only if `w3-use-netscape-configuration-file' is non-nil.")
|
|
218
|
|
219 (defvar w3-netscape-compatible-comments t
|
|
220 "*Whether to honor netscape-style <! > comments.
|
|
221 Ye gods I wish I could turn this off by default.")
|
|
222
|
|
223 (defvar w3-notify 'semibully
|
|
224 "*Selects the behavior when w3 page is ready.
|
|
225 This variable may have one of the following values:
|
|
226
|
|
227 newframe -- put the w3 page in its own frame
|
|
228 bully -- make the w3 page the current buffer and only window
|
|
229 semibully -- make the w3 page the current buffer in the same window
|
|
230 aggressive -- make the w3 page the current buffer in the other window
|
|
231 friendly -- display w3page in other window but don't make current
|
|
232 polite -- don't display w3 page, but prints message when ready (beeps)
|
|
233 quiet -- like `polite', but don't beep
|
|
234 meek -- make no indication that page is ready
|
|
235
|
|
236 Any other value of `w3-notify' is equivalent to `meek'.")
|
|
237
|
|
238 (defvar w3-ppmtoxbm-command "ppmtopgm | pgmtopbm | pbmtoxbm"
|
|
239 "*The command used to convert from the portable-pixmap graphics format
|
|
240 to an x bitmap. This will only ever be used if XEmacs doesn't have support
|
|
241 for XPM.")
|
|
242
|
|
243 (defvar w3-ppmtoxpm-command "ppmtoxpm"
|
|
244 "*The command used to convert from the portable-pixmap graphics format
|
|
245 to XPM. The XPM _MUST_ be in version 3 format.")
|
|
246
|
|
247 (defvar w3-print-command "lpr -h -d"
|
|
248 "*Print command for dvi files.
|
|
249 This is usually lpr -h -d to send it to a postscript printer, but you can set
|
|
250 it up so that it is any command that takes a dvi file as its last argument.")
|
|
251
|
|
252 (defvar w3-reuse-buffers 'reuse
|
|
253 "What to do when following a link will re-fetch a document that has
|
|
254 already been fetched into a W3 buffer. Possible values are: nil,
|
|
255 'yes, and 'no. Nil means ask the user if we should reuse the buffer.
|
|
256 A value of 'yes means assume the user wants us to reuse the buffer.
|
|
257 A value of 'no means assume the user wants us to re-fetch the document.
|
|
258
|
|
259 This will also accept:
|
|
260 'no 'never 'reload ==> always reload
|
|
261 'yes 'reuse 'always ==> always reuse
|
|
262 'ask nil ==> always ask")
|
|
263
|
14
|
264 (defvar w3-right-margin 2
|
0
|
265 "*Amount of space to leave on right margin of WWW buffers.
|
|
266 This amount is subtracted from (window-width) for each new WWW buffer
|
|
267 and used as the new fill-column.")
|
|
268
|
|
269 (defvar w3-maximum-line-length nil
|
|
270 "*Maximum length of a line. If nil, then lines can extend all the way to
|
|
271 the window margin. If a number, the smaller of this and
|
14
|
272 (- (window-width) w3-right-margin) is used.")
|
0
|
273
|
|
274 (defvar w3-right-justify-address t
|
|
275 "*Whether to make address fields right justified, like Arena.")
|
|
276
|
|
277 (defvar w3-show-headers nil
|
|
278 "*This is a list of regexps that match HTTP/1.0 headers to show at
|
|
279 the end of a buffer. All the headers being matched against will be
|
|
280 in lowercase. All matching headers will be inserted at the end of the
|
|
281 buffer in a <UL> list.")
|
|
282
|
|
283 (defvar w3-show-status t
|
|
284 "*Whether to show a running total of bytes transferred. Can cause a
|
|
285 large hit if using a remote X display over a slow link, or a terminal
|
|
286 with a slow modem.")
|
|
287
|
|
288 (defvar w3-starting-documents
|
|
289 '(("Internet Starting Points" "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/StartingPoints/NetworkStartingPoints.html")
|
|
290 ("Internet Resources Meta-index" "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html")
|
|
291 ("NCSA's What's New" "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/whats-new.html"))
|
|
292 "*An assoc list of titles and URLs for quick access. These are just
|
|
293 defaults so that new users have somewhere to go.")
|
|
294
|
|
295 (defvar w3-temporary-directory "/tmp" "*Where temporary files go.")
|
|
296
|
|
297 (defvar w3-track-last-buffer nil
|
|
298 "*Whether to track the last w3 buffer to automatically switch to with
|
|
299 M-x w3.")
|
|
300
|
|
301 (defvar w3-track-mouse t
|
|
302 "*Whether to track the mouse and message the url under the mouse.")
|
|
303
|
|
304 (defvar w3-use-forms-index t
|
|
305 "*Non-nil means translate <ISINDEX> tags into a hypertext form.
|
|
306 A single text entry box will be drawn where the ISINDEX tag appears.
|
|
307 If t, the isindex handling will be the same as Mosaic for X.")
|
|
308
|
|
309 (defvar w3-use-netscape-configuration-file nil
|
|
310 "*Whether to use a netscape configuration file to determine things like
|
|
311 home pages, link colors, etc. If non-nil, then `w3-netscape-configuration-file'
|
|
312 is read in at startup.")
|
|
313
|
|
314 (defvar w3-honor-stylesheets t
|
|
315 "*Whether to let a document specify a CSS stylesheet.")
|
|
316
|
|
317 (defvar w3-user-colors-take-precedence nil
|
|
318 "*Whether to let a document define certain colors about itself.
|
|
319 Like foreground and background colors and pixmaps, color of links and
|
|
320 visited links, etc.")
|
|
321
|
|
322 (defvar w3-gc-cons-threshold-multiplier 1
|
|
323 "Amount to temporarily multiply gc-cons-threshold by when parsing HTML.
|
|
324 Setting this to a number greater than 1 will result in less frequent
|
|
325 garbage collections when parsing an HTML document, which may often speed
|
|
326 up handling of a large document with many elements. The disadvantage is
|
|
327 that it allows Emacs's total memory usage to grow larger, which may result
|
|
328 in later garbage collections taking more time.")
|
|
329
|
|
330 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
331 ;;; Hook Variables
|
|
332 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
333 (defvar w3-load-hook nil "*Hooks to be run after loading w3.")
|
|
334 (defvar w3-mode-hook nil "*Hooks to be run after entering w3-mode.")
|
|
335 (defvar w3-file-prepare-hook nil
|
|
336 "*Hooks to be run before preparing a buffer.")
|
|
337 (defvar w3-file-done-hook nil "*Hooks to be run after preparing a buffer.")
|
|
338 (defvar w3-source-file-hook nil
|
|
339 "*Hooks to be run after getting document source.")
|
|
340
|
|
341 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
342 ;;; Figure out what flavor of emacs we are running
|
|
343 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
344 (defvar w3-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
|
2
|
345 "*In XEmacs?.")
|
0
|
346
|
|
347 (defvar w3-running-FSF19 (and (string-match "^19" emacs-version)
|
|
348 (not w3-running-xemacs))
|
|
349 "*In FSF v19 emacs?")
|
|
350
|
|
351 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
352 ;;; Link delimiting
|
|
353 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
354 (defvar w3-delimit-emphasis 'guess
|
|
355 "*Whether to use characters at the start and end of each bold/italic
|
|
356 region. Obsolete variable (almost) - all this should be specified by the
|
|
357 default stylesheet.")
|
|
358
|
|
359 (defvar w3-link-start-delimiter '("[[" . "{{")
|
|
360 "*Put this at front of link if w3-delimit-links is t.")
|
|
361
|
|
362 (defvar w3-link-end-delimiter '("]]" . "}}")
|
|
363 "*Put this at end of link if w3-delimit-links is t.")
|
|
364
|
|
365 (defvar w3-delimit-links 'guess
|
|
366 "*Put brackets around links? If this variable is eq to 'linkname, then
|
|
367 it will put the link # in brackets after the link text. If it is nil, then
|
|
368 it will not put anything. If it is non-nil and not eq to 'linkname, then
|
|
369 it will put [[ & ]] around the entire text of the link. Is initially set
|
|
370 to be t iff in normal emacs. Nil if in XEmacs or lucid emacs, since links
|
|
371 should be in different colors/fonts.")
|
|
372
|
|
373 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
374 ;;; Graphics parsing stuff
|
|
375 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
376 (defvar w3-graphics-always-show-entities t
|
|
377 "*Set to t to always show graphic entities, regardless of the value of
|
|
378 w3-delay-image-loads. Useful if you keep the entities locally and aren't
|
|
379 worried about the transfer time on something that small.")
|
|
380
|
|
381 (defvar w3-graphics-list nil
|
|
382 "*List of graphics already read in.")
|
|
383
|
|
384 (defvar w3-delay-image-loads nil
|
|
385 "*Delay loading images for w3 or not?")
|
|
386
|
|
387 (defvar w3-delayed-images nil
|
|
388 "*A buffer-local variable holding positions and urls of images within
|
|
389 the buffer.")
|
|
390
|
|
391 (defvar w3-image-mappings
|
|
392 '(
|
|
393 ("image/x-xbitmap" . xbm)
|
|
394 ("image/xbitmap" . xbm)
|
|
395 ("image/xbm" . xbm)
|
|
396 ("image/jpeg" . jpeg)
|
|
397 ("image/gif" . gif)
|
|
398 ("image/png" . png)
|
|
399 ("image/x-fax" . g3fax)
|
|
400 ("image/x-raster" . rast)
|
|
401 ("image/windowdump" . xwd)
|
|
402 ("image/x-icon" . icon)
|
|
403 ("image/portable-graymap" . pgm)
|
|
404 ("image/portable-pixmap" . ppm)
|
|
405 ("image/x-pixmap" . xpm)
|
|
406 ("image/x-xpixmap" . xpm)
|
|
407 ("image/pict" . pict)
|
|
408 ("image/x-rgb" . sgi)
|
|
409 ("image/x-sgi" . sgi)
|
|
410 ("image/x-macpaint" . macpt)
|
|
411 ("image/x-targa" . tga)
|
|
412 ("image/tiff" . tiff)
|
|
413 ) "*How to map MIME types to image types for the `image' package.")
|
|
414
|
|
415 (defvar w3-color-use-reducing 'guess
|
|
416 "*Whether to use ppmquant/ppmdither to do color reducing for inlined images.
|
|
417 If you are using a 24bit display, you should set this to nil.")
|
|
418
|
|
419 (defvar w3-color-max-red 4
|
|
420 "*Max # of red cells to allocate for inlined images.")
|
|
421
|
|
422 (defvar w3-color-max-green 4
|
|
423 "*Max # of green cells to allocate for inlined images.")
|
|
424
|
|
425 (defvar w3-color-max-blue 4
|
|
426 "*Max # of blue cells to allocate for inlined images.")
|
|
427
|
|
428 (defvar w3-color-filter 'ppmdither
|
|
429 "*How to do color reducing on inlined images.
|
|
430 This should be a symbol, either ppmdither or ppmquant.
|
|
431 This variable only has any meaning if w3-color-use-reducing is non-nil.
|
|
432 Possible values are:
|
|
433
|
|
434 ppmquant :== Use the ppmquant program to reduce colors. The product
|
|
435 of w3-color-max-[red|green|blue] is used as the maximum
|
|
436 number of colors.
|
|
437 ppmdither :== Use the ppmdither program to reduce colors.
|
|
438
|
|
439 any string :== Use this string as the filter. No interpretation of it
|
|
440 is done at all. Example is:
|
|
441 ppmquant -fs -map ~/pixmaps/colormap.ppm")
|
|
442
|
|
443 (defvar w3-ppmdither-is-buggy t
|
|
444 "*The ppmdither which comes with pbmplus/netpbm releases through
|
|
445 1mar1994 at least ignores the 'maxval' in its input. This can cause
|
|
446 trouble viewing black-and-white gifs. If this variable is set, a
|
|
447 (harmless) 'pnmdepth 255' step is inserted to work around this bug.
|
|
448 You can test your ppmdither by doing
|
|
449 ppmmake white 100 100 | pnmdepth 1 | ppmdither | pnmdepth 255 | ppmhist
|
|
450 If the output has a single line like this:
|
|
451 255 255 255 255 10000
|
|
452 then it's safe to set this variable to nil.")
|
|
453
|
|
454 ;; Store the database of HTML general entities.
|
|
455 (defvar w3-html-entities
|
|
456 '(
|
|
457 (excl . 33)
|
|
458 (quot . 34)
|
|
459 (num . 35)
|
|
460 (dollar . 36)
|
|
461 (percent . 37)
|
|
462 (amp . 38)
|
|
463 (rsquo . 39)
|
|
464 (apos . 39)
|
|
465 (lpar . 40)
|
|
466 (rpar . 41)
|
|
467 (times . 42)
|
|
468 (ast . 42)
|
|
469 (plus . 43)
|
|
470 (comma . 44)
|
|
471 (period . 46)
|
|
472 (colon . 58)
|
|
473 (semi . 59)
|
|
474 (lt . 60)
|
|
475 (equals . 61)
|
|
476 (gt . 62)
|
|
477 (quest . 63)
|
|
478 (commat . 64)
|
|
479 (lsqb . 91)
|
|
480 (rsqb . 93)
|
|
481 (uarr . 94)
|
|
482 (lowbar . 95)
|
|
483 (lsquo . 96)
|
|
484 (lcub . 123)
|
|
485 (verbar . 124)
|
|
486 (rcub . 125)
|
|
487 (tilde . 126)
|
|
488 (nbsp . 160)
|
|
489 (iexcl . 161)
|
|
490 (cent . 162)
|
|
491 (pound . 163)
|
|
492 (curren . 164)
|
|
493 (yen . 165)
|
|
494 (brvbar . 166)
|
|
495 (sect . 167)
|
|
496 (uml . 168)
|
|
497 (copy . 169)
|
|
498 (ordf . 170)
|
|
499 (laquo . 171)
|
|
500 (not . 172)
|
|
501 (shy . 173)
|
|
502 (reg . 174)
|
|
503 (macr . 175)
|
|
504 (deg . 176)
|
|
505 (plusmn . 177)
|
|
506 (sup2 . 178)
|
|
507 (sup3 . 179)
|
|
508 (acute . 180)
|
|
509 (micro . 181)
|
|
510 (para . 182)
|
|
511 (middot . 183)
|
|
512 (cedil . 184)
|
|
513 (sup1 . 185)
|
|
514 (ordm . 186)
|
|
515 (raquo . 187)
|
|
516 (frac14 . 188)
|
|
517 (frac12 . 189)
|
|
518 (frac34 . 190)
|
|
519 (iquest . 191)
|
|
520 (Agrave . 192)
|
|
521 (Aacute . 193)
|
|
522 (Acirc . 194)
|
|
523 (Atilde . 195)
|
|
524 (Auml . 196)
|
|
525 (Aring . 197)
|
|
526 (AElig . 198)
|
|
527 (Ccedil . 199)
|
|
528 (Egrave . 200)
|
|
529 (Eacute . 201)
|
|
530 (Ecirc . 202)
|
|
531 (Euml . 203)
|
|
532 (Igrave . 204)
|
|
533 (Iacute . 205)
|
|
534 (Icirc . 206)
|
|
535 (Iuml . 207)
|
|
536 (ETH . 208)
|
|
537 (Ntilde . 209)
|
|
538 (Ograve . 210)
|
|
539 (Oacute . 211)
|
|
540 (Ocirc . 212)
|
|
541 (Otilde . 213)
|
|
542 (Ouml . 214)
|
|
543 (times . 215)
|
|
544 (Oslash . 216)
|
|
545 (Ugrave . 217)
|
|
546 (Uacute . 218)
|
|
547 (Ucirc . 219)
|
|
548 (Uuml . 220)
|
|
549 (Yacute . 221)
|
|
550 (THORN . 222)
|
|
551 (szlig . 223)
|
|
552 (agrave . 224)
|
|
553 (aacute . 225)
|
|
554 (acirc . 226)
|
|
555 (atilde . 227)
|
|
556 (auml . 228)
|
|
557 (aring . 229)
|
|
558 (aelig . 230)
|
|
559 (ccedil . 231)
|
|
560 (egrave . 232)
|
|
561 (eacute . 233)
|
|
562 (ecirc . 234)
|
|
563 (euml . 235)
|
|
564 (igrave . 236)
|
|
565 (iacute . 237)
|
|
566 (icirc . 238)
|
|
567 (iuml . 239)
|
|
568 (eth . 240)
|
|
569 (ntilde . 241)
|
|
570 (ograve . 242)
|
|
571 (oacute . 243)
|
|
572 (ocirc . 244)
|
|
573 (otilde . 245)
|
|
574 (ouml . 246)
|
|
575 (divide . 247)
|
|
576 (oslash . 248)
|
|
577 (ugrave . 249)
|
|
578 (uacute . 250)
|
|
579 (ucirc . 251)
|
|
580 (uuml . 252)
|
|
581 (yacute . 253)
|
|
582 (thorn . 254)
|
|
583 (yuml . 255)
|
|
584
|
|
585 ;; Special handling of these
|
|
586 (frac56 . "5/6")
|
|
587 (frac16 . "1/6")
|
|
588 (frac45 . "4/5")
|
|
589 (frac35 . "3/5")
|
|
590 (frac25 . "2/5")
|
|
591 (frac15 . "1/5")
|
|
592 (frac23 . "2/3")
|
|
593 (frac13 . "1/3")
|
|
594 (frac78 . "7/8")
|
|
595 (frac58 . "5/8")
|
|
596 (frac38 . "3/8")
|
|
597 (frac18 . "1/8")
|
|
598
|
|
599 ;; The following 5 entities are not mentioned in the HTML 2.0
|
|
600 ;; standard, nor in any other HTML proposed standard of which I
|
|
601 ;; am aware. I am not even sure they are ISO entity names. ***
|
|
602 ;; Hence, some arrangement should be made to give a bad HTML
|
|
603 ;; message when they are seen.
|
|
604 (ndash . 45)
|
|
605 (mdash . 45)
|
|
606 (emsp . 32)
|
|
607 (ensp . 32)
|
|
608 (sim . 126)
|
|
609 (le . "<=")
|
|
610 (agr . "alpha")
|
|
611 (rdquo . "''")
|
|
612 (ldquo . "``")
|
|
613 (trade . "(TM)")
|
|
614 ;; To be done
|
|
615 ;; (shy . ????) ; soft hyphen
|
|
616 )
|
|
617 "*An assoc list of entity names and how to actually display them.")
|
|
618
|
|
619 (defvar w3-graphic-entities
|
|
620 '(
|
|
621 (archive "archive" )
|
|
622 (audio "audio" )
|
|
623 (binary.document "binary.document" )
|
|
624 (binhex.document "binhex.document" )
|
|
625 (calculator "calculator" )
|
|
626 (caution "caution" )
|
|
627 (cd.i "cd.i" )
|
|
628 (cd.rom "cd.rom" )
|
|
629 (clock "clock" )
|
|
630 (compressed.document "compressed.document" )
|
|
631 (disk.drive "disk.drive" )
|
|
632 (diskette "diskette" )
|
|
633 (document "document" )
|
|
634 (fax "fax" )
|
|
635 (filing.cabinet "filing.cabinet" )
|
|
636 (film "film" )
|
|
637 (fixed.disk "fixed.disk" )
|
|
638 (folder "folder" )
|
|
639 (form "form" )
|
|
640 (ftp "ftp" )
|
|
641 (glossary "glossary" )
|
|
642 (gopher "gopher" )
|
|
643 (home "home" )
|
|
644 (html "html" )
|
|
645 (image "image" )
|
|
646 (index "index" )
|
|
647 (keyboard "keyboard" )
|
|
648 (mail "mail" )
|
|
649 (mail.in "mail.in" )
|
|
650 (mail.out "mail.out" )
|
|
651 (map "map" )
|
|
652 (mouse "mouse" )
|
|
653 (new "new" )
|
|
654 (next "next" )
|
|
655 (notebook "notebook" )
|
|
656 (parent "parent" )
|
|
657 (play.fast.forward "play.fast.forward" )
|
|
658 (play.fast.reverse "play.fast.reverse" )
|
|
659 (play.pause "play.pause" )
|
|
660 (play.start "play.start" )
|
|
661 (play.stop "play.stop" )
|
|
662 (previous "previous" )
|
2
|
663 (prince "prince" "the artist formerly known as prince")
|
|
664 (princesymbol "prince" "the artist formerly known as prince")
|
0
|
665 (printer "printer" )
|
|
666 (sadsmiley "sadsmiley" ":(")
|
|
667 (smiley "smiley" ":)")
|
|
668 (stop "stop" )
|
|
669 (summary "summary" )
|
|
670 (telephone "telephone" )
|
|
671 (telnet "telnet" )
|
|
672 (text.document "text.document" )
|
|
673 (tn3270 "tn3270" )
|
|
674 (toc "toc" )
|
|
675 (trash "trash" )
|
|
676 (unknown.document "unknown.document" )
|
|
677 (uuencoded.document "uuencoded.document" )
|
|
678 (work "work" )
|
|
679 (www "www" )
|
|
680 )
|
|
681 "List of graphical entity names and the tail end of a URL for them.
|
|
682 If there is a 3rd item in the list, it is the alternative text to use
|
|
683 for the image.")
|
|
684
|
|
685 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
686 ;;; Menu definitions
|
|
687 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
688 (defvar w3-navigate-menu nil)
|
|
689 (defvar w3-popup-menu
|
|
690 '("Emacs-W3 Commands"
|
20
|
691 ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))]
|
|
692 ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))]
|
0
|
693 )
|
|
694 "The shorter popup menu.")
|
|
695
|
|
696 (defvar w3-documentation-root "http://www.cs.indiana.edu/elisp/w3/docs/"
|
|
697 "*Where the w3 documentation lives. This MUST end in a slash.")
|
|
698
|
|
699 (defvar w3-graphlink-menu
|
|
700 '(("Open this Image (%s)" . w3-fetch)
|
|
701 ("Save this Image As..." . w3-download-url)
|
|
702 ("Copy this Image Location" . w3-save-url)
|
|
703 ("Information on this Image". w3-popup-image-info))
|
|
704 "An assoc list of function names and labels. These will be displayed
|
|
705 in a popup menu when the mouse is pressed on a hyperlink. Format is
|
|
706 ( (label . function)), function is called with one argument, the URL of
|
|
707 the link. Each label can have exactly one `%s' that will be replaced by
|
|
708 the URL of the link.")
|
|
709
|
|
710 (defvar w3-hyperlink-menu
|
|
711 '(("Open this Link (%s)" . w3-fetch)
|
|
712 ("Add Bookmark for this Link" . w3-hotlist-add-document)
|
|
713 ("New Window with this Link" . w3-fetch-other-frame)
|
|
714 ("Save Link As..." . w3-download-url)
|
|
715 ("Copy this Link Location to Clipboard" . w3-save-url)
|
|
716 ("Information on this Link" . w3-popup-info))
|
|
717 "An assoc list of function names and labels. These will be displayed
|
|
718 in a popup menu when the mouse is pressed on a hyperlink. Format is
|
|
719 ( (label . function)), function is called with one argument, the URL of
|
|
720 the link. Each label can have exactly one `%s' that will be replaced by
|
|
721 the URL of the link.")
|
|
722
|
14
|
723 (defvar w3-defined-link-types
|
|
724 ;; This is the HTML3.0 list (downcased) plus "made".
|
|
725 '("previous" "next" "up" "down" "home" "toc" "index" "glossary"
|
|
726 "copyright" "bookmark" "help" "made")
|
|
727 "A list of the (lower-case) names which have special significance
|
|
728 as the values of REL or REV attributes of <link> elements. They will
|
|
729 be presented on the toolbar or the links menu, for instance.")
|
|
730
|
0
|
731 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
732 ;;; Variables internal to W3, you should not change any of these
|
|
733 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
734 (defvar w3-form-radio-elements nil "Internal variable - do not touch!")
|
|
735 (defvar w3-form-elements nil "Internal variable - do not touch!")
|
|
736
|
|
737 (defvar w3-invisible-href-list nil
|
|
738 "A list of 'invisible' graphic links in the current buffer.")
|
|
739
|
|
740 (defconst w3-state-locator-variable
|
|
741 '(
|
|
742 :align
|
|
743 :background
|
|
744 :center
|
|
745 :depth
|
|
746 :figalt
|
|
747 :figdata
|
|
748 :fillcol
|
|
749 :form
|
|
750 :formnum
|
|
751 :header-start
|
|
752 :href
|
|
753 :link-args
|
|
754 :image
|
|
755 :lists
|
|
756 :map
|
|
757 :name
|
|
758 :needspace
|
|
759 :next-break
|
|
760 :nofill
|
|
761 :nowrap
|
|
762 :optarg
|
|
763 :options
|
|
764 :pre-start
|
|
765 :select
|
|
766 :secret
|
|
767 :table
|
|
768 :text-mangler
|
|
769 :title
|
|
770 :link-title
|
|
771 :w3-graphic
|
|
772 :zone
|
|
773 :label-text
|
|
774 :seen-this-url
|
|
775 )
|
|
776 "A list of all the various state kept in the drawing engine.
|
|
777 This is used by the `w3-get-state' and `w3-put-state' macros.")
|
|
778
|
|
779 (defvar w3-state-vector
|
|
780 (make-vector (1+ (length w3-state-locator-variable)) nil)
|
|
781 "Various state shit kept by emacs-w3.")
|
|
782
|
|
783 (defvar w3-user-stylesheet nil
|
|
784 "The global stylesheet for this user.")
|
|
785
|
|
786 (defvar w3-current-stylesheet nil
|
|
787 "The stylesheet for this document.")
|
|
788
|
|
789 (defvar w3-base-alist nil
|
|
790 "An assoc list of named BASE tags in the current document.")
|
|
791
|
|
792 (defvar w3-blinking-buffs nil
|
|
793 "A list of buffers with blinking text in them.
|
|
794 This is used to optimize when we change a face so the entire display
|
|
795 doesn't flash every second, whether we've run into a buffer that is
|
|
796 displaying blinking text or not.")
|
|
797
|
|
798 (defvar w3-last-fill-pos nil
|
|
799 "An internal variable for the new display engine that specifies the
|
|
800 last character position that was correctly filled.")
|
|
801
|
|
802 (defvar w3-last-tag nil
|
|
803 "An internal variable for the new display engine that specifies the
|
|
804 last tag processed.")
|
|
805
|
|
806 (defvar w3-table-info nil
|
|
807 "An internal variable for the new display engine for keeping table data
|
|
808 during the pre-pass parsing.")
|
|
809
|
|
810 (defvar w3-current-formatter nil
|
|
811 "Current formatter function.")
|
|
812
|
|
813 (defvar w3-draw-buffer nil
|
|
814 "Where we are currently drawing into. This _must_ be a buffer object
|
|
815 when it is referenced.")
|
|
816
|
|
817 (defvar w3-active-faces nil "The list of active faces.")
|
|
818 (defvar w3-active-voices nil "The list of active voices.")
|
|
819
|
|
820 (defvar w3-netscape-variable-mappings
|
|
821 '(("PRINT_COLOR" . ps-print-color-p)
|
|
822 ("DITHER_IMAGES" . w3-color-use-reducing)
|
|
823 ("SOCKS_HOST" . url-socks-host)
|
|
824 ("ORGANIZATION" . url-user-organization)
|
|
825 ("EMAIL_ADDRESS" . url-personal-mail-address)
|
|
826 ("REAL_NAME" . url-user-real-name)
|
|
827 ("NEWSGROUP_DESCRIPTIONS" . url-show-newsgroup-descriptions)
|
|
828 ("NNTPSERVER" . url-news-server)
|
|
829 ("AUTOLOAD_IMAGES" . w3-delay-image-loads)
|
|
830 ("HOME_DOCUMENT" . w3-default-homepage)
|
|
831 ("UNDERLINE_LINKS" . w3-underline-links)
|
|
832 ("TMPDIR" . url-temporary-directory))
|
|
833 "A mapping from netscape configuration file options to w3 variables.")
|
|
834
|
|
835 (defvar w3-acceptable-protocols-alist
|
|
836 '(("Gopher" . "gopher")
|
|
837 ("TN3270 (IBM Mainframe emulation)" . "tn3270")
|
|
838 ("Interactive Telnet Session" . "telnet")
|
|
839 ("Local file or file over ftp" . "file")
|
|
840 ("File on an http server" . "http")
|
|
841 ("Usenet newsgroup/article" . "news")
|
|
842 ("Mail session" . "mailto"))
|
|
843 "An assoc list of descriptive labels and the corresponding URL stub.")
|
|
844
|
2
|
845 (defconst w3-bug-address "wmperry@cs.indiana.edu"
|
|
846 "Address of current maintainer, where to send bug reports.")
|
0
|
847 (defvar w3-continuation '(url-uncompress url-clean-text)
|
|
848 "List of functions to call to process a document completely.")
|
|
849 (defvar w3-current-isindex nil "Is the current document a searchable index?")
|
|
850 (defvar w3-current-last-buffer nil "Last W3 buffer seen before this one.")
|
14
|
851 (defvar w3-current-links nil "An assoc list of <link> tags for this doc.")
|
|
852 (defvar w3-current-metainfo nil "An assoc list of <meta> tags for this doc.")
|
0
|
853 (defvar w3-current-source nil "Source of current document.")
|
|
854 (defvar w3-current-parse nil "Parsed version of current document.")
|
|
855 (defconst w3-default-continuation '(url-uncompress url-clean-text)
|
|
856 "Default action to start with - cleans text and uncompresses if necessary.")
|
|
857 (defvar w3-find-this-link nil "Link to go to within a document.")
|
|
858 (defvar w3-hidden-forms nil "List of hidden form areas and their info.")
|
|
859 (defvar w3-hotlist nil "Default hotlist.")
|
|
860 (defvar w3-icon-path-cache nil "Cache of where we found icons for entities.")
|
|
861 (defvar w3-last-buffer nil "The last W3 buffer visited.")
|
|
862 (defvar w3-print-next nil "Should we latex & print the next doc?")
|
|
863 (defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.")
|
|
864 (defvar w3-setup-done nil "Have we been through setup code yet?")
|
|
865 (defvar w3-source nil "Should we source the next document or not?")
|
|
866
|
|
867 (defvar w3-strict-width nil
|
|
868 "*This variable will control how wide emacs thinks the current window is.
|
|
869 This is useful when working in batch mode, and (window-width) returns the
|
|
870 wrong value. If the value is nil, it will use the value (window-width)
|
|
871 returns.")
|
|
872
|
|
873 (defvar w3-submit-button nil
|
|
874 "A widget object specifying what button was pressed to submit a form.")
|
|
875
|
|
876 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
877 ;;; buffer-local variables to keep around when going into w3-mode
|
|
878 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
879 (defvar w3-id-positions nil "Internal use only.")
|
|
880 (defvar w3-imagemaps nil "Internal use only.")
|
|
881
|
|
882 (defvar w3-persistent-variables
|
|
883 '(
|
|
884 ;; So we can show the URL in the list-buffers listing
|
|
885 list-buffers-directory
|
|
886 ;; So widgets don't get lost
|
|
887 widget-field-new
|
|
888 w3-form-radio-elements
|
|
889 w3-form-elements
|
|
890 url-current-callback-func
|
|
891 url-current-content-length
|
|
892 url-current-file
|
|
893 url-current-mime-encoding
|
|
894 url-current-mime-headers
|
|
895 url-current-mime-type
|
|
896 url-current-mime-viewer
|
|
897 url-current-port
|
|
898 url-current-referer
|
|
899 url-current-server
|
|
900 url-current-type
|
|
901 url-current-user
|
|
902 w3-current-parse
|
|
903 w3-current-isindex
|
|
904 w3-current-last-buffer
|
|
905 w3-current-links
|
14
|
906 w3-current-metainfo
|
0
|
907 w3-current-source
|
|
908 w3-delayed-images
|
|
909 w3-hidden-forms
|
|
910 w3-invisible-href-list
|
|
911 w3-state-vector
|
|
912 w3-current-stylesheet
|
|
913 w3-form-labels
|
|
914 w3-id-positions
|
|
915 w3-imagemaps
|
|
916 )
|
|
917 "A list of variables that should be preserved when entering w3-mode.")
|
|
918
|
|
919 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
920 ;;; Syntax stuff
|
|
921 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
922 (defvar w3-parse-args-syntax-table
|
|
923 (copy-syntax-table emacs-lisp-mode-syntax-table)
|
|
924 "A syntax table for parsing sgml attributes.")
|
|
925
|
|
926 (modify-syntax-entry ?' "\"" w3-parse-args-syntax-table)
|
|
927 (modify-syntax-entry ?` "\"" w3-parse-args-syntax-table)
|
|
928 (modify-syntax-entry ?< "(>" w3-parse-args-syntax-table)
|
|
929 (modify-syntax-entry ?> ")<" w3-parse-args-syntax-table)
|
|
930
|
|
931 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
932 ;;; Emulation stuff
|
|
933 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
934 (defvar w3-netscape-emulation-minor-mode nil
|
|
935 "Whether we are in the netscape emulation minor mode.")
|
|
936 (defvar w3-netscape-emulation-minor-mode-map (make-sparse-keymap)
|
|
937 "Keymap for netscape emulation.")
|
|
938 (defvar w3-lynx-emulation-minor-mode nil
|
|
939 "Whether we are in the lynx emulation minor mode.")
|
|
940 (defvar w3-lynx-emulation-minor-mode-map (make-sparse-keymap)
|
|
941 "Keymap for lynx emulation.")
|
|
942 (defvar w3-last-search-item nil)
|
|
943
|
|
944 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
945 ;;; Startup items
|
|
946 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
947 (defvar w3-form-labels nil "")
|
|
948 (mapcar (function
|
|
949 (lambda (var)
|
|
950 (if (boundp var)
|
|
951 (make-variable-buffer-local var)))) w3-persistent-variables)
|
|
952 (make-variable-buffer-local 'w3-state-vector)
|
|
953 (make-variable-buffer-local 'w3-current-stylesheet)
|
|
954 (make-variable-buffer-local 'w3-base-alist)
|
|
955 (make-variable-buffer-local 'w3-last-tag)
|
|
956 (make-variable-buffer-local 'w3-last-fill-pos)
|
|
957 (make-variable-buffer-local 'w3-table-info)
|
|
958 (make-variable-buffer-local 'w3-draw-buffer)
|
|
959 (make-variable-buffer-local 'w3-current-formatter)
|
|
960 (make-variable-buffer-local 'w3-active-faces)
|
|
961 (make-variable-buffer-local 'w3-default-style)
|
|
962 (make-variable-buffer-local 'w3-netscape-emulation-minor-mode)
|
|
963 (make-variable-buffer-local 'w3-lynx-emulation-minor-mode)
|
|
964 (make-variable-buffer-local 'w3-last-search-item)
|
|
965
|
|
966
|
|
967 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
968 ;;; Keymap definitions
|
|
969 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
970 (defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.")
|
|
971 (suppress-keymap w3-mode-map)
|
|
972
|
|
973 (define-key w3-mode-map "h" (make-sparse-keymap))
|
|
974 (define-key w3-mode-map "H" (make-sparse-keymap))
|
|
975 (define-key w3-mode-map "a" (make-sparse-keymap))
|
|
976
|
|
977 (define-key w3-mode-map "ha" 'w3-hotlist-apropos)
|
|
978 (define-key w3-mode-map "hd" 'w3-hotlist-delete)
|
|
979 (define-key w3-mode-map "hi" 'w3-hotlist-add-document)
|
|
980 (define-key w3-mode-map "hv" 'w3-show-hotlist)
|
|
981 (define-key w3-mode-map "hr" 'w3-hotlist-rename-entry)
|
|
982 (define-key w3-mode-map "hu" 'w3-use-hotlist)
|
|
983 (define-key w3-mode-map "hA" 'w3-hotlist-append)
|
|
984 (define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point)
|
|
985 (define-key w3-mode-map "hR" 'w3-hotlist-refresh)
|
|
986
|
20
|
987 (define-key w3-mode-map "HF" 'w3-history-forward)
|
|
988 (define-key w3-mode-map "HB" 'w3-history-backward)
|
0
|
989 (define-key w3-mode-map "Hv" 'w3-show-history-list)
|
|
990
|
|
991 (define-key w3-mode-map " " 'w3-scroll-up)
|
|
992 (define-key w3-mode-map "<" 'beginning-of-buffer)
|
|
993 (define-key w3-mode-map ">" 'end-of-buffer)
|
|
994 (define-key w3-mode-map "?" 'w3-help)
|
20
|
995 (define-key w3-mode-map "B" 'w3-history-backward)
|
|
996 (define-key w3-mode-map "F" 'w3-history-forward)
|
0
|
997 (define-key w3-mode-map "G" 'w3-show-graphics)
|
|
998 (define-key w3-mode-map "I" 'w3-popup-info)
|
|
999 (define-key w3-mode-map "K" 'w3-save-this-url)
|
|
1000 (define-key w3-mode-map "P" 'w3-print-url-under-point)
|
|
1001 (define-key w3-mode-map "Q" 'w3-leave-buffer)
|
|
1002 (define-key w3-mode-map "R" 'w3-refresh-buffer)
|
|
1003 (define-key w3-mode-map "S" 'w3-source-document-at-point)
|
|
1004 (define-key w3-mode-map "U" 'w3-use-links)
|
|
1005 (define-key w3-mode-map "V" 'w3-view-this-url)
|
|
1006 (define-key w3-mode-map "\C-?" 'scroll-down)
|
|
1007 (define-key w3-mode-map "\C-c\C-b" 'w3-show-history-list)
|
|
1008 (define-key w3-mode-map "\C-c\C-v" 'w3-version)
|
|
1009 (define-key w3-mode-map "\C-o" 'w3-fetch)
|
|
1010 (define-key w3-mode-map "\M-M" 'w3-mail-document-under-point)
|
|
1011 (define-key w3-mode-map "\M-m" 'w3-mail-current-document)
|
|
1012 (define-key w3-mode-map "\M-s" 'w3-search)
|
|
1013 (define-key w3-mode-map "\M-\r" 'w3-follow-inlined-image)
|
|
1014 (define-key w3-mode-map "\r" 'w3-widget-button-press)
|
16
|
1015 (define-key w3-mode-map "\n" 'w3-widget-button-press)
|
14
|
1016 (define-key w3-mode-map "b" 'w3-widget-backward)
|
0
|
1017 (define-key w3-mode-map "c" 'w3-mail-document-author)
|
14
|
1018 (define-key w3-mode-map "f" 'w3-widget-forward)
|
0
|
1019 (define-key w3-mode-map "g" 'w3-reload-document)
|
|
1020 (define-key w3-mode-map "i" 'w3-document-information)
|
|
1021 (define-key w3-mode-map "k" 'w3-save-url)
|
|
1022 (define-key w3-mode-map "l" 'w3-goto-last-buffer)
|
|
1023 (define-key w3-mode-map "m" 'w3-complete-link)
|
14
|
1024 (define-key w3-mode-map "n" 'w3-widget-forward)
|
0
|
1025 (define-key w3-mode-map "o" 'w3-open-local)
|
|
1026 (define-key w3-mode-map "p" 'w3-print-this-url)
|
|
1027 (define-key w3-mode-map "q" 'w3-quit)
|
|
1028 (define-key w3-mode-map "r" 'w3-reload-document)
|
|
1029 (define-key w3-mode-map "s" 'w3-source-document)
|
|
1030 (define-key w3-mode-map "u" 'w3-leave-buffer)
|
|
1031 (define-key w3-mode-map "v" 'url-view-url)
|
|
1032 (define-key w3-mode-map "w" 'w3-submit-bug)
|
|
1033
|
|
1034 ;; Emulate some netscape stuff by default
|
|
1035 (define-key w3-mode-map [(control alt t)] 'url-list-processes)
|
|
1036 (define-key w3-mode-map [(control meta t)] 'url-list-processes)
|
|
1037
|
|
1038 ;; Widget navigation
|
20
|
1039 (define-key w3-mode-map "\t" 'w3-widget-forward)
|
|
1040 (define-key w3-mode-map [backtab] 'w3-widget-backward)
|
14
|
1041 (define-key w3-mode-map [(shift tab)] 'w3-widget-backward)
|
20
|
1042 (define-key w3-mode-map [(meta tab)] 'w3-widget-backward)
|
0
|
1043
|
|
1044 ;;; This is so we can use a consistent method of checking for mule support
|
|
1045 ;;; Emacs-based mule uses (boundp 'MULE), but XEmacs-based mule uses
|
|
1046 ;;; (featurep 'mule) - I choose to use the latter.
|
|
1047
|
|
1048 (if (boundp 'MULE)
|
|
1049 (provide 'mule))
|
|
1050 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1051 ;;; Keyword definitions
|
|
1052 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1053 (require 'w3-keyword)
|
|
1054 (provide 'w3-vars)
|