comparison lisp/w3/w3-vars.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 6a22abad6937
children 1ce6082ce73f
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
1 ;;; w3-vars.el,v --- All variable definitions for emacs-w3 1 ;;; w3-vars.el,v --- All variable definitions for emacs-w3
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/03/26 20:12:26 3 ;; Created: 1996/08/29 04:09:40
4 ;; Version: 1.116 4 ;; Version: 1.18
5 ;; Keywords: comm, help, hypermedia 5 ;; Keywords: comm, help, hypermedia
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) 8 ;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu)
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
10 ;;; 9 ;;;
11 ;;; This file is part of GNU Emacs. 10 ;;; This file is not part of GNU Emacs, but the same permissions apply.
12 ;;; 11 ;;;
13 ;;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;;; 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 13 ;;; 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) 14 ;;; the Free Software Foundation; either version 2, or (at your option)
16 ;;; any later version. 15 ;;; any later version.
19 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details. 20 ;;; GNU General Public License for more details.
22 ;;; 21 ;;;
23 ;;; You should have received a copy of the GNU General Public License 22 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Emacs; see the file COPYING. If not, write to the 23 ;;; along with GNU Emacs; see the file COPYING. If not, write to
25 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
26 ;;; Boston, MA 02111-1307, USA.
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28 26
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 ;;; Variable definitions for w3 28 ;;; Variable definitions for w3
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32
33 (require 'w3-cus) ; Grab everything that is customized
34
35 (defconst w3-version-number 30 (defconst w3-version-number
36 (let ((x "p3.0.75")) 31 (let ((x "p3.0.12"))
37 (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x) 32 (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x)
38 (setq x (substring x (match-beginning 1) (match-end 1))) 33 (setq x (substring x (match-beginning 1) (match-end 1)))
39 (setq x (substring x 1))) 34 (setq x (substring x 1)))
40 (mapconcat 35 (mapconcat
41 (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x "")) 36 (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x ""))
42 "Version # of w3-mode.") 37 "Version # of w3-mode.")
43 38
44 (defconst w3-version-date (let ((x "1997/03/26 20:12:26")) 39 (defconst w3-version-date (let ((x "1996/08/29 04:09:40"))
45 (if (string-match "Date: \\([^ \t\n]+\\)" x) 40 (if (string-match "Date: \\([^ \t\n]+\\)" x)
46 (substring x (match-beginning 1) (match-end 1)) 41 (substring x (match-beginning 1) (match-end 1))
47 x)) 42 x))
48 "Date this version of w3-mode was released.") 43 "Date this version of w3-mode was released.")
49 44
52 "More descriptive version of w3-version-number.") 47 "More descriptive version of w3-version-number.")
53 48
54 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 49 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55 ;;; General configuration variables 50 ;;; General configuration variables
56 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52 (defvar w3-annotation-mode 'html-mode
53 "*A symbol specifying the major mode to enter when doing annotations.")
54
55 (defvar w3-annotation-position 'bottom
56 "*A symbol specifying where personal annotations should appear in a buffer.
57 Can be one of the symbols 'top or 'bottom. If the symbol is eq to 'top, then
58 the annotations will appear at the top of the buffer. If 'bottom, will appear
59 at the end of the buffer.")
60
61 (defvar w3-auto-image-alt t
62 "*Whether emacs-w3 should create an alt attribute for an image that
63 is missing it.
64 If nil, emacs-w3 will not automatically create an ALT attribute.
65 If t, the alt attribute will be [IMAGE(nameofimage)]
66 If a string, it should be a string suitable for running through format,
67 with only one %s, which will be replaced with just the filename of the
68 graphic that is not loaded.")
69
70 (defvar w3-configuration-directory "~/.w3/"
71 "*Where emacs-w3 can find its configuration files")
72
73 (defvar w3-debug-html nil "*Whether to gripe about bad HTML or not.")
74
75 (defvar w3-debug-buffer "*HTML Debug*"
76 "*Name of buffer to store debugging information in.")
77
78 (defvar w3-default-configuration-file nil
79 "*Where per-user customizations of w3 are kept.")
80
81 (defvar w3-default-action 'w3-prepare-buffer
82 "*A lisp symbol specifying what action to take for files with
83 extensions that are not mapped to a MIME type in `mm-mime-extensions'.
84 This is useful in case you ever run across files with weird extensions
85 \(.foo, .README, .READMEFIRST, etc). This should not be required
86 anymore.
87
88 Possible values: any lisp symbol. Should be a function that takes no
89 arguments. The return value does not matter, it is ignored. Some examples
90 are:
91
92 Action Value
93 ----------------------------------------------
94 Parse as HTML 'w3-prepare-buffer
95 View as text 'indented-text-mode")
96
97 (defvar w3-default-homepage nil
98 "*The url to open at startup. It can be any valid URL. This will
99 default to the environment variable WWW_HOME if you do not set it in
100 your .emacs file. If WWW_HOME is undefined, then it will default to
101 the hypertext documentation for W3 at Indiana University.")
102
103 (defvar w3-default-stylesheet nil
104 "*The filename of the users default stylesheet.")
105
106 (defvar w3-do-blinking nil
107 "*Whether emacs-w3 should display blinking text.")
108
109 (defvar w3-do-incremental-display nil
110 "*Whether to do incremental display of pages or not.")
111
112 (defvar w3-documents-menu-file nil
113 "*Where the Mosaic documents-menu file is located. This is a file
114 that has extra menus for the 'Navigate' menu. This should be in the same
115 format as the Mosaic extra documents.menu.")
116
57 (defvar w3-dump-to-disk nil 117 (defvar w3-dump-to-disk nil
58 "*If non-nil, all W3 pages loaded will be dumped to disk.") 118 "*If non-nil, all W3 pages loaded will be dumped to disk.")
59 119
60 (defvar w3-fetch-with-default t 120 (defvar w3-echo-link 'url
61 "*Whether `w3-fetch' should determine a good starting URL as a default.") 121 "Whether to display the URL of a link when tabbing through links.
122 Possible values are:
123
124 url == show the url of the target in the minibuffer
125 text == show the text of the link in the minibuffer
126 nil == show nothing")
127
128 (defvar w3-horizontal-rule-char ?-
129 "*The character to use to create a horizontal rule.
130 Must be the character's code, not a string. This character is
131 replicated across the screen to create a division.")
132
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-html2latex-args "-s -"
141 "*Args to pass `w3-html2latex-prog'. This should send the LaTeX source
142 to standard output.")
143
144 (defvar w3-html2latex-prog "html2latex"
145 "*Program to convert html to latex.")
146
147 (defvar w3-icon-directory "http://cs.indiana.edu/elisp/w3/icons/"
148 "*Where to find standard icons. Must end in a /!")
149
150 (defvar w3-icon-format 'xbm
151 "*What file extension icons end in. This is a symbol, string, or nil.
152 If nil, then no file extension is used.")
153
154 (defvar w3-indent-level 4
155 "*Default # of spaces to indent instead of using TABs. This is
156 necessary to preserve tabs in PRE segments yet still get smaller
157 indentation for lists, etc.")
158
159 (defvar w3-keep-old-buffers t
160 "*Whether to keep old buffers around when following links.")
161
162 (defvar w3-latex-docstyle "{article}"
163 "*The documentstyle to use when printing/mailing converted HTML
164 files in LaTeX. Good defaults are:
165 {article}, [psfig,twocolumn]{article}, etc.")
166
167 (defvar w3-link-info-display-function nil
168 "*A function to call to get extra information about a link and
169 include it in a buffer. Will be placed after the link and any other
170 delimiters.")
171
172 (defvar w3-mail-command 'mail
173 "*This function will be called whenever w3 needs to send mail. It should
174 enter a mail-mode-like buffer in the current window.
175 `w3-mail-other-window-command' will be used if w3-mutable-windows is t.
176 The commands `mail-to' and `mail-subject' should still work in this
177 buffer, and it should use mail-header-separator if possible.")
178
179 (defvar w3-mail-other-window-command 'mail-other-window
180 "*This function will be called whenever w3 needs to send mail in
181 another window. It should enter a mail-mode-like buffer in a
182 different window. The commands `mail-to' and `mail-subject' should still
183 work in this buffer, and it should use mail-header-separator if
184 possible.")
185
186 (defvar w3-max-inlined-image-size nil
187 "*The maximum byte size of a file to transfer as an inlined image.
188 If an image is being retrieved and exceeds this size, then it will be
189 cancelled. This works best on HTTP/1.0 servers that send a
190 Content-length header, otherwise the image is retrieved up until the
191 max number of bytes is retrieved, then killed.")
192
193 (defvar w3-max-menu-length 35
194 "*The maximum length of a pulldown menu before it will be split into
195 smaller chunks, with the first part as a submenu, followed by the rest
196 of the menu.")
197
198 (defvar w3-max-menu-width 40 "*The maximum width of a pulldown menu choice.")
199
200 (defvar w3-modeline-format
201 '(" " ("W3"
202 (w3-netscape-emulation-minor-mode
203 " (NS)")
204 (w3-lynx-emulation-minor-mode
205 " (Lynx)")
206 ": "
207 (40 (-40 "%b"))
208 " "
209 (w3-current-isindex "[Searchable] ")
210 "%p" " " global-mode-string))
211 "*The modeline format string when in w3 mode")
212
213 (defvar w3-mule-attribute 'underline
214 "*How to highlight items in Mule (Multi-Linugual Emacs).")
215
216 (defvar w3-mutable-windows nil
217 "*Controls how new WWW documents are displayed. If this is set to
218 non-nil and pop-up-windows is non-nil, then new buffers will be shown
219 in another window. If either is nil, then it will replace the document
220 in the current window.")
221
222 (defvar w3-netscape-configuration-file nil
223 "*A Netscape-for-X style configuration file. This file will only be read if
224 and only if `w3-use-netscape-configuration-file' is non-nil.")
225
226 (defvar w3-netscape-compatible-comments t
227 "*Whether to honor netscape-style <! > comments.
228 Ye gods I wish I could turn this off by default.")
229
230 (defvar w3-notify 'semibully
231 "*Selects the behavior when w3 page is ready.
232 This variable may have one of the following values:
233
234 newframe -- put the w3 page in its own frame
235 bully -- make the w3 page the current buffer and only window
236 semibully -- make the w3 page the current buffer in the same window
237 aggressive -- make the w3 page the current buffer in the other window
238 friendly -- display w3page in other window but don't make current
239 polite -- don't display w3 page, but prints message when ready (beeps)
240 quiet -- like `polite', but don't beep
241 meek -- make no indication that page is ready
242
243 Any other value of `w3-notify' is equivalent to `meek'.")
244
245 (defvar w3-personal-annotation-directory nil
246 "*Directory where w3 looks for personal annotations.
247 This is a directory that should hold the personal annotations stored in
248 a Mosaic-compatible format.")
249
250 (defvar w3-ppmtoxbm-command "ppmtopgm | pgmtopbm | pbmtoxbm"
251 "*The command used to convert from the portable-pixmap graphics format
252 to an x bitmap. This will only ever be used if XEmacs doesn't have support
253 for XPM.")
254
255 (defvar w3-ppmtoxpm-command "ppmtoxpm"
256 "*The command used to convert from the portable-pixmap graphics format
257 to XPM. The XPM _MUST_ be in version 3 format.")
258
259 (defvar w3-print-command "lpr -h -d"
260 "*Print command for dvi files.
261 This is usually lpr -h -d to send it to a postscript printer, but you can set
262 it up so that it is any command that takes a dvi file as its last argument.")
263
264 (defvar w3-reuse-buffers 'reuse
265 "What to do when following a link will re-fetch a document that has
266 already been fetched into a W3 buffer. Possible values are: nil,
267 'yes, and 'no. Nil means ask the user if we should reuse the buffer.
268 A value of 'yes means assume the user wants us to reuse the buffer.
269 A value of 'no means assume the user wants us to re-fetch the document.
270
271 This will also accept:
272 'no 'never 'reload ==> always reload
273 'yes 'reuse 'always ==> always reuse
274 'ask nil ==> always ask")
275
276 (defvar w3-right-border 2
277 "*Amount of space to leave on right margin of WWW buffers.
278 This amount is subtracted from (window-width) for each new WWW buffer
279 and used as the new fill-column.")
280
281 (defvar w3-maximum-line-length nil
282 "*Maximum length of a line. If nil, then lines can extend all the way to
283 the window margin. If a number, the smaller of this and
284 (- (window-width) w3-right-border) is used.")
285
286 (defvar w3-right-justify-address t
287 "*Whether to make address fields right justified, like Arena.")
288
289 (defvar w3-show-headers nil
290 "*This is a list of regexps that match HTTP/1.0 headers to show at
291 the end of a buffer. All the headers being matched against will be
292 in lowercase. All matching headers will be inserted at the end of the
293 buffer in a <UL> list.")
294
295 (defvar w3-show-status t
296 "*Whether to show a running total of bytes transferred. Can cause a
297 large hit if using a remote X display over a slow link, or a terminal
298 with a slow modem.")
299
300 (defvar w3-starting-documents
301 '(("Internet Starting Points" "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/StartingPoints/NetworkStartingPoints.html")
302 ("Internet Resources Meta-index" "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html")
303 ("NCSA's What's New" "http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/whats-new.html"))
304 "*An assoc list of titles and URLs for quick access. These are just
305 defaults so that new users have somewhere to go.")
306
307 (defvar w3-temporary-directory "/tmp" "*Where temporary files go.")
62 308
63 (defvar w3-track-last-buffer nil 309 (defvar w3-track-last-buffer nil
64 "*Whether to track the last w3 buffer to automatically switch to with 310 "*Whether to track the last w3 buffer to automatically switch to with
65 M-x w3.") 311 M-x w3.")
312
313 (defvar w3-track-mouse t
314 "*Whether to track the mouse and message the url under the mouse.")
315
316 (defvar w3-use-forms-index t
317 "*Non-nil means translate <ISINDEX> tags into a hypertext form.
318 A single text entry box will be drawn where the ISINDEX tag appears.
319 If t, the isindex handling will be the same as Mosaic for X.")
320
321 (defvar w3-use-html2latex nil
322 "*This controls how HTML is converted into LaTeX for printing or mailing.
323 If nil, the w3-convert-html-to-latex function is used instead of the
324 html2latex in a subprocess. The lisp function gives slightly better
325 formatting in my biased opinion.")
326
327 (defvar w3-use-netscape-configuration-file nil
328 "*Whether to use a netscape configuration file to determine things like
329 home pages, link colors, etc. If non-nil, then `w3-netscape-configuration-file'
330 is read in at startup.")
331
332 (defvar w3-honor-stylesheets t
333 "*Whether to let a document specify a CSS stylesheet.")
334
335 (defvar w3-user-colors-take-precedence nil
336 "*Whether to let a document define certain colors about itself.
337 Like foreground and background colors and pixmaps, color of links and
338 visited links, etc.")
66 339
67 (defvar w3-gc-cons-threshold-multiplier 1 340 (defvar w3-gc-cons-threshold-multiplier 1
68 "Amount to temporarily multiply gc-cons-threshold by when parsing HTML. 341 "Amount to temporarily multiply gc-cons-threshold by when parsing HTML.
69 Setting this to a number greater than 1 will result in less frequent 342 Setting this to a number greater than 1 will result in less frequent
70 garbage collections when parsing an HTML document, which may often speed 343 garbage collections when parsing an HTML document, which may often speed
71 up handling of a large document with many elements. The disadvantage is 344 up handling of a large document with many elements. The disadvantage is
72 that it allows Emacs's total memory usage to grow larger, which may result 345 that it allows Emacs's total memory usage to grow larger, which may result
73 in later garbage collections taking more time.") 346 in later garbage collections taking more time.")
74 347
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 348 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
349 ;;; Hook Variables
350 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
351 (defvar w3-load-hook nil "*Hooks to be run after loading w3.")
352 (defvar w3-mode-hook nil "*Hooks to be run after entering w3-mode.")
353 (defvar w3-file-prepare-hook nil
354 "*Hooks to be run before preparing a buffer.")
355 (defvar w3-file-done-hook nil "*Hooks to be run after preparing a buffer.")
356 (defvar w3-source-file-hook nil
357 "*Hooks to be run after getting document source.")
358
359 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
76 ;;; Figure out what flavor of emacs we are running 360 ;;; Figure out what flavor of emacs we are running
77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 361 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
78 (defvar w3-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version) 362 (defvar w3-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
79 "*In XEmacs?.") 363 "*In XEmacs?.")
80 364
81 (defvar w3-running-FSF19 (and (string-match "^19" emacs-version) 365 (defvar w3-running-FSF19 (and (string-match "^19" emacs-version)
82 (not w3-running-xemacs)) 366 (not w3-running-xemacs))
83 "*In FSF v19 emacs?") 367 "*In FSF v19 emacs?")
84 368
85 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 369 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
370 ;;; Link delimiting
371 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
372 (defvar w3-delimit-emphasis 'guess
373 "*Whether to use characters at the start and end of each bold/italic
374 region. Obsolete variable (almost) - all this should be specified by the
375 default stylesheet.")
376
377 (defvar w3-link-start-delimiter '("[[" . "{{")
378 "*Put this at front of link if w3-delimit-links is t.")
379
380 (defvar w3-link-end-delimiter '("]]" . "}}")
381 "*Put this at end of link if w3-delimit-links is t.")
382
383 (defvar w3-delimit-links 'guess
384 "*Put brackets around links? If this variable is eq to 'linkname, then
385 it will put the link # in brackets after the link text. If it is nil, then
386 it will not put anything. If it is non-nil and not eq to 'linkname, then
387 it will put [[ & ]] around the entire text of the link. Is initially set
388 to be t iff in normal emacs. Nil if in XEmacs or lucid emacs, since links
389 should be in different colors/fonts.")
390
391 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
392 ;;; Graphics parsing stuff
393 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
394 (defvar w3-graphics-always-show-entities t
395 "*Set to t to always show graphic entities, regardless of the value of
396 w3-delay-image-loads. Useful if you keep the entities locally and aren't
397 worried about the transfer time on something that small.")
398
399 (defvar w3-graphics-list nil
400 "*List of graphics already read in.")
401
402 (defvar w3-delay-image-loads nil
403 "*Delay loading images for w3 or not?")
404
405 (defvar w3-delayed-images nil
406 "*A buffer-local variable holding positions and urls of images within
407 the buffer.")
408
409 (defvar w3-image-mappings
410 '(
411 ("image/x-xbitmap" . xbm)
412 ("image/xbitmap" . xbm)
413 ("image/xbm" . xbm)
414 ("image/jpeg" . jpeg)
415 ("image/gif" . gif)
416 ("image/png" . png)
417 ("image/x-fax" . g3fax)
418 ("image/x-raster" . rast)
419 ("image/windowdump" . xwd)
420 ("image/x-icon" . icon)
421 ("image/portable-graymap" . pgm)
422 ("image/portable-pixmap" . ppm)
423 ("image/x-pixmap" . xpm)
424 ("image/x-xpixmap" . xpm)
425 ("image/pict" . pict)
426 ("image/x-rgb" . sgi)
427 ("image/x-sgi" . sgi)
428 ("image/x-macpaint" . macpt)
429 ("image/x-targa" . tga)
430 ("image/tiff" . tiff)
431 ) "*How to map MIME types to image types for the `image' package.")
432
433 (defvar w3-color-use-reducing 'guess
434 "*Whether to use ppmquant/ppmdither to do color reducing for inlined images.
435 If you are using a 24bit display, you should set this to nil.")
436
437 (defvar w3-color-max-red 4
438 "*Max # of red cells to allocate for inlined images.")
439
440 (defvar w3-color-max-green 4
441 "*Max # of green cells to allocate for inlined images.")
442
443 (defvar w3-color-max-blue 4
444 "*Max # of blue cells to allocate for inlined images.")
445
446 (defvar w3-color-filter 'ppmdither
447 "*How to do color reducing on inlined images.
448 This should be a symbol, either ppmdither or ppmquant.
449 This variable only has any meaning if w3-color-use-reducing is non-nil.
450 Possible values are:
451
452 ppmquant :== Use the ppmquant program to reduce colors. The product
453 of w3-color-max-[red|green|blue] is used as the maximum
454 number of colors.
455 ppmdither :== Use the ppmdither program to reduce colors.
456
457 any string :== Use this string as the filter. No interpretation of it
458 is done at all. Example is:
459 ppmquant -fs -map ~/pixmaps/colormap.ppm")
460
461 (defvar w3-ppmdither-is-buggy t
462 "*The ppmdither which comes with pbmplus/netpbm releases through
463 1mar1994 at least ignores the 'maxval' in its input. This can cause
464 trouble viewing black-and-white gifs. If this variable is set, a
465 (harmless) 'pnmdepth 255' step is inserted to work around this bug.
466 You can test your ppmdither by doing
467 ppmmake white 100 100 | pnmdepth 1 | ppmdither | pnmdepth 255 | ppmhist
468 If the output has a single line like this:
469 255 255 255 255 10000
470 then it's safe to set this variable to nil.")
471
472 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
473 ;;; How to look up styles
474 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
475 (defvar w3-style-tags-assoc
476 '(
477 (b . ("*" . "*"))
478 (address . ("*" . "*"))
479 (byline . ("_" . "_"))
480 (cite . ("_" . "_"))
481 (cmd . ("*" . "*"))
482 (dfn . ("*" . "*"))
483 (em . ("~" . "~"))
484 (i . ("~" . "~"))
485 (q . ("\"" . "\""))
486 (removed . ("" . ""))
487 (s . ("" . ""))
488 (strong . ("*" . "*"))
489 (sub . ("" . ""))
490 (sup . ("" . ""))
491 (u . ("_" . "_"))
492 )
493 "*An assoc list of emphasis tags and their corresponding
494 begin and end characters.")
495
496 (defvar w3-header-chars-assoc
497 '(
498 (h1 . (?* ?* w3-upcase-region))
499 (h2 . (?* ?* w3-upcase-region))
500 (h3 . (?- ?- w3-upcase-region))
501 (h4 . (nil ?= nil))
502 (h5 . (nil ?= nil))
503 (h6 . (nil ?: nil)))
504 "*An assoc list of header tags and a list of formatting instructions.
505 This list consists of 3 items - the first item is no longer used. The
506 second item is the character to insert after the header. A <BR> is
507 inserted before and after this string. And the third is a function to
508 call on the region between the start and end of the header. This will
509 be called with 2 arguments, the buffer positions of the start and end
510 of the headers.")
511
86 ;; Store the database of HTML general entities. 512 ;; Store the database of HTML general entities.
87 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
88 (defvar w3-html-entities 513 (defvar w3-html-entities
89 '( 514 '(
90 (excl . 33) 515 (excl . 33)
91 (quot . 34) 516 (quot . 34)
92 (num . 35) 517 (num . 35)
313 ) 738 )
314 "List of graphical entity names and the tail end of a URL for them. 739 "List of graphical entity names and the tail end of a URL for them.
315 If there is a 3rd item in the list, it is the alternative text to use 740 If there is a 3rd item in the list, it is the alternative text to use
316 for the image.") 741 for the image.")
317 742
743 (defvar w3-list-chars-assoc
744 '(
745 (ul . ("o" "*" "+" ">"))
746 (ol . ("." ")" "]" ":"))
747 (dl . ("o" "*" "+" ">")))
748 "An assoc list of characters to put at the front of list items. It is
749 keyed on the type of list, followed by a list of items. Each item should
750 be placed in the nth position of the list, where n is the nesting level it
751 should be used for. n starts at 1.")
752
318 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 753 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
319 ;;; Menu definitions 754 ;;; Menu definitions
320 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 755 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
756 (defvar w3-navigate-menu nil)
321 (defvar w3-popup-menu 757 (defvar w3-popup-menu
322 '("Emacs-W3 Commands" 758 '("Emacs-W3 Commands"
323 ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))] 759 ["Back" w3-backward-in-history t]
324 ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))] 760 ["Forward" w3-forward-in-history t]
325 "---" 761 "---"
326 ["Reload" (w3-reload-document) t] 762 ["Add annotation" w3-annotation-add t]
327 ["Show Images" (w3-load-delayed-images) w3-delayed-images]
328 "---"
329 ["Add bookmark" (w3-hotlist-add-document nil) t]
330 ) 763 )
331 "The shorter popup menu.") 764 "The shorter popup menu.")
765
766 (defvar w3-documentation-root "http://www.cs.indiana.edu/elisp/w3/docs/"
767 "*Where the w3 documentation lives. This MUST end in a slash.")
332 768
333 (defvar w3-graphlink-menu 769 (defvar w3-graphlink-menu
334 '(("Open this Image (%s)" . w3-fetch) 770 '(("Open this Image (%s)" . w3-fetch)
335 ("Save this Image As..." . w3-download-url) 771 ("Save this Image As..." . w3-download-url)
336 ("Copy this Image Location" . w3-save-url) 772 ("Copy this Image Location" . w3-save-url)
341 the link. Each label can have exactly one `%s' that will be replaced by 777 the link. Each label can have exactly one `%s' that will be replaced by
342 the URL of the link.") 778 the URL of the link.")
343 779
344 (defvar w3-hyperlink-menu 780 (defvar w3-hyperlink-menu
345 '(("Open this Link (%s)" . w3-fetch) 781 '(("Open this Link (%s)" . w3-fetch)
346 ("Add Bookmark for this Link" . w3-hotlist-add-document-at-point) 782 ("Add Bookmark for this Link" . w3-hotlist-add-document)
347 ("New Window with this Link" . w3-fetch-other-frame) 783 ("New Window with this Link" . w3-fetch-other-frame)
348 ("Save Link As..." . w3-download-url) 784 ("Save Link As..." . w3-download-url)
349 ("Copy this Link Location to Clipboard" . w3-save-url) 785 ("Copy this Link Location to Clipboard" . w3-save-url)
350 ("Information on this Link" . w3-popup-info)) 786 ("Information on this Link" . w3-popup-info))
351 "An assoc list of function names and labels. These will be displayed 787 "An assoc list of function names and labels. These will be displayed
355 the URL of the link.") 791 the URL of the link.")
356 792
357 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 793 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
358 ;;; Variables internal to W3, you should not change any of these 794 ;;; Variables internal to W3, you should not change any of these
359 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 795 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
360 (defvar w3-graphics-list nil
361 "*List of graphics already read in.")
362
363 (defvar w3-delayed-images nil
364 "*A buffer-local variable holding positions and urls of images within
365 the buffer.")
366
367 (defvar w3-frameset-structure nil
368 "Frameset structure, heap of '(frameset ({cols|rows} \"<dimensions>\")) and '(<frame name> <href>)")
369
370 (defvar w3-frame-name nil
371 "Frame name")
372
373 (defvar w3-base-target nil
374 "Base target name")
375
376 (defvar w3-target-window-distances nil
377 "Target window distances")
378
379 (defvar w3-form-radio-elements nil "Internal variable - do not touch!") 796 (defvar w3-form-radio-elements nil "Internal variable - do not touch!")
380 (defvar w3-form-elements nil "Internal variable - do not touch!") 797 (defvar w3-form-elements nil "Internal variable - do not touch!")
381 798
799 (defvar w3-invisible-href-list nil
800 "A list of 'invisible' graphic links in the current buffer.")
801
802 (defconst w3-state-locator-variable
803 '(
804 :align
805 :background
806 :center
807 :depth
808 :figalt
809 :figdata
810 :fillcol
811 :form
812 :formnum
813 :header-start
814 :href
815 :link-args
816 :image
817 :lists
818 :map
819 :name
820 :needspace
821 :next-break
822 :nofill
823 :nowrap
824 :optarg
825 :options
826 :pre-start
827 :select
828 :secret
829 :table
830 :text-mangler
831 :title
832 :link-title
833 :w3-graphic
834 :zone
835 :label-text
836 :seen-this-url
837 )
838 "A list of all the various state kept in the drawing engine.
839 This is used by the `w3-get-state' and `w3-put-state' macros.")
840
841 (defvar w3-state-vector
842 (make-vector (1+ (length w3-state-locator-variable)) nil)
843 "Various state shit kept by emacs-w3.")
844
382 (defvar w3-user-stylesheet nil 845 (defvar w3-user-stylesheet nil
383 "The global stylesheet for this user.") 846 "The global stylesheet for this user.")
384 847
385 (defvar w3-current-stylesheet nil 848 (defvar w3-current-stylesheet nil
386 "The stylesheet for this document.") 849 "The stylesheet for this document.")
850
851 (defvar w3-base-alist nil
852 "An assoc list of named BASE tags in the current document.")
387 853
388 (defvar w3-blinking-buffs nil 854 (defvar w3-blinking-buffs nil
389 "A list of buffers with blinking text in them. 855 "A list of buffers with blinking text in them.
390 This is used to optimize when we change a face so the entire display 856 This is used to optimize when we change a face so the entire display
391 doesn't flash every second, whether we've run into a buffer that is 857 doesn't flash every second, whether we've run into a buffer that is
393 859
394 (defvar w3-last-fill-pos nil 860 (defvar w3-last-fill-pos nil
395 "An internal variable for the new display engine that specifies the 861 "An internal variable for the new display engine that specifies the
396 last character position that was correctly filled.") 862 last character position that was correctly filled.")
397 863
864 (defvar w3-last-tag nil
865 "An internal variable for the new display engine that specifies the
866 last tag processed.")
867
868 (defvar w3-table-info nil
869 "An internal variable for the new display engine for keeping table data
870 during the pre-pass parsing.")
871
872 (defvar w3-current-formatter nil
873 "Current formatter function.")
874
875 (defvar w3-draw-buffer nil
876 "Where we are currently drawing into. This _must_ be a buffer object
877 when it is referenced.")
878
398 (defvar w3-active-faces nil "The list of active faces.") 879 (defvar w3-active-faces nil "The list of active faces.")
399 (defvar w3-active-voices nil "The list of active voices.") 880 (defvar w3-active-voices nil "The list of active voices.")
400 881
882 (defvar w3-netscape-variable-mappings
883 '(("PRINT_COLOR" . ps-print-color-p)
884 ("DITHER_IMAGES" . w3-color-use-reducing)
885 ("SOCKS_HOST" . url-socks-host)
886 ("ORGANIZATION" . url-user-organization)
887 ("EMAIL_ADDRESS" . url-personal-mail-address)
888 ("REAL_NAME" . url-user-real-name)
889 ("NEWSGROUP_DESCRIPTIONS" . url-show-newsgroup-descriptions)
890 ("NNTPSERVER" . url-news-server)
891 ("AUTOLOAD_IMAGES" . w3-delay-image-loads)
892 ("HOME_DOCUMENT" . w3-default-homepage)
893 ("UNDERLINE_LINKS" . w3-underline-links)
894 ("TMPDIR" . url-temporary-directory))
895 "A mapping from netscape configuration file options to w3 variables.")
896
897 (defvar w3-acceptable-protocols-alist
898 '(("Gopher" . "gopher")
899 ("TN3270 (IBM Mainframe emulation)" . "tn3270")
900 ("Interactive Telnet Session" . "telnet")
901 ("Local file or file over ftp" . "file")
902 ("File on an http server" . "http")
903 ("Usenet newsgroup/article" . "news")
904 ("Mail session" . "mailto"))
905 "An assoc list of descriptive labels and the corresponding URL stub.")
906
907 (defvar w3-annotation-marker "<ncsa-annotation-format-1>")
908 (defvar w3-annotation-minor-mode nil "Whether we are in the minor mode.")
401 (defconst w3-bug-address "wmperry@cs.indiana.edu" 909 (defconst w3-bug-address "wmperry@cs.indiana.edu"
402 "Address of current maintainer, where to send bug reports.") 910 "Address of current maintainer, where to send bug reports.")
403 (defvar w3-continuation '(url-uncompress url-clean-text) 911 (defvar w3-continuation '(url-uncompress url-clean-text)
404 "List of functions to call to process a document completely.") 912 "List of functions to call to process a document completely.")
913 (defvar w3-current-annotation nil "URL of document we are annotating...")
405 (defvar w3-current-isindex nil "Is the current document a searchable index?") 914 (defvar w3-current-isindex nil "Is the current document a searchable index?")
406 (defvar w3-current-last-buffer nil "Last W3 buffer seen before this one.") 915 (defvar w3-current-last-buffer nil "Last W3 buffer seen before this one.")
407 (defvar w3-current-links nil "An assoc list of <link> tags for this doc.") 916 (defvar w3-current-links nil "An assoc list of <LINK> tags for this doc.")
408 (defvar w3-current-metainfo nil "An assoc list of <meta> tags for this doc.")
409 (defvar w3-current-source nil "Source of current document.") 917 (defvar w3-current-source nil "Source of current document.")
410 (defvar w3-current-parse nil "Parsed version of current document.") 918 (defvar w3-current-parse nil "Parsed version of current document.")
411 (defconst w3-default-continuation '(url-uncompress url-clean-text) 919 (defconst w3-default-continuation '(url-uncompress url-clean-text)
412 "Default action to start with - cleans text and uncompresses if necessary.") 920 "Default action to start with - cleans text and uncompresses if necessary.")
921 (defvar w3-editing-annotation nil "Are we editing an annotation or not?")
413 (defvar w3-find-this-link nil "Link to go to within a document.") 922 (defvar w3-find-this-link nil "Link to go to within a document.")
414 (defvar w3-hidden-forms nil "List of hidden form areas and their info.") 923 (defvar w3-hidden-forms nil "List of hidden form areas and their info.")
415 (defvar w3-hotlist nil "Default hotlist.") 924 (defvar w3-hotlist nil "Default hotlist.")
416 (defvar w3-icon-path-cache nil "Cache of where we found icons for entities.") 925 (defvar w3-icon-path-cache nil "Cache of where we found icons for entities.")
417 (defvar w3-last-buffer nil "The last W3 buffer visited.") 926 (defvar w3-last-buffer nil "The last W3 buffer visited.")
927 (defvar w3-personal-annotations nil "Assoc list of personal annotations.")
418 (defvar w3-print-next nil "Should we latex & print the next doc?") 928 (defvar w3-print-next nil "Should we latex & print the next doc?")
419 (defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.") 929 (defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.")
420 (defvar w3-setup-done nil "Have we been through setup code yet?") 930 (defvar w3-setup-done nil "Have we been through setup code yet?")
421 (defvar w3-source nil "Should we source the next document or not?") 931 (defvar w3-source nil "Should we source the next document or not?")
422 932
430 "A widget object specifying what button was pressed to submit a form.") 940 "A widget object specifying what button was pressed to submit a form.")
431 941
432 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 942 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
433 ;;; buffer-local variables to keep around when going into w3-mode 943 ;;; buffer-local variables to keep around when going into w3-mode
434 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 944 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
945 (defvar w3-e19-hotlist-menu nil
946 "A menu for hotlists.")
947
948 (defvar w3-e19-links-menu nil
949 "A buffer-local menu for links.")
950
435 (defvar w3-id-positions nil "Internal use only.") 951 (defvar w3-id-positions nil "Internal use only.")
436 (defvar w3-imagemaps nil "Internal use only.") 952 (defvar w3-imagemaps nil "Internal use only.")
437 953
438 (defvar w3-persistent-variables 954 (defvar w3-persistent-variables
439 '( 955 '(
443 widget-field-new 959 widget-field-new
444 w3-form-radio-elements 960 w3-form-radio-elements
445 w3-form-elements 961 w3-form-elements
446 url-current-callback-func 962 url-current-callback-func
447 url-current-content-length 963 url-current-content-length
964 url-current-file
448 url-current-mime-encoding 965 url-current-mime-encoding
449 url-current-mime-headers 966 url-current-mime-headers
450 url-current-mime-type 967 url-current-mime-type
451 url-current-mime-viewer 968 url-current-mime-viewer
452 url-current-object 969 url-current-port
453 url-current-referer 970 url-current-referer
971 url-current-server
972 url-current-type
973 url-current-user
974 w3-e19-links-menu
454 w3-current-parse 975 w3-current-parse
976 w3-current-annotation
455 w3-current-isindex 977 w3-current-isindex
456 w3-current-last-buffer 978 w3-current-last-buffer
457 w3-current-links 979 w3-current-links
458 w3-current-metainfo
459 w3-current-source 980 w3-current-source
460 w3-delayed-images 981 w3-delayed-images
461 w3-hidden-forms 982 w3-hidden-forms
983 w3-invisible-href-list
984 w3-state-vector
462 w3-current-stylesheet 985 w3-current-stylesheet
463 w3-form-labels 986 w3-form-labels
464 w3-id-positions 987 w3-id-positions
465 w3-imagemaps 988 w3-imagemaps
466 w3-base-target
467 w3-target-window-distances
468 w3-frameset-structure
469 ) 989 )
470 "A list of variables that should be preserved when entering w3-mode.") 990 "A list of variables that should be preserved when entering w3-mode.")
991
992 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
993 ;;; Syntax stuff
994 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
995 (defvar w3-parse-args-syntax-table
996 (copy-syntax-table emacs-lisp-mode-syntax-table)
997 "A syntax table for parsing sgml attributes.")
998
999 (modify-syntax-entry ?' "\"" w3-parse-args-syntax-table)
1000 (modify-syntax-entry ?` "\"" w3-parse-args-syntax-table)
1001 (modify-syntax-entry ?< "(>" w3-parse-args-syntax-table)
1002 (modify-syntax-entry ?> ")<" w3-parse-args-syntax-table)
471 1003
472 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1004 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
473 ;;; Emulation stuff 1005 ;;; Emulation stuff
474 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1006 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
475 (defvar w3-netscape-emulation-minor-mode nil 1007 (defvar w3-netscape-emulation-minor-mode nil
488 (defvar w3-form-labels nil "") 1020 (defvar w3-form-labels nil "")
489 (mapcar (function 1021 (mapcar (function
490 (lambda (var) 1022 (lambda (var)
491 (if (boundp var) 1023 (if (boundp var)
492 (make-variable-buffer-local var)))) w3-persistent-variables) 1024 (make-variable-buffer-local var)))) w3-persistent-variables)
493 1025 (make-variable-buffer-local 'w3-state-vector)
1026 (make-variable-buffer-local 'w3-current-stylesheet)
1027 (make-variable-buffer-local 'w3-base-alist)
1028 (make-variable-buffer-local 'w3-annotation-minor-mode)
1029 (make-variable-buffer-local 'w3-last-tag)
494 (make-variable-buffer-local 'w3-last-fill-pos) 1030 (make-variable-buffer-local 'w3-last-fill-pos)
495 (make-variable-buffer-local 'w3-frame-name) 1031 (make-variable-buffer-local 'w3-table-info)
1032 (make-variable-buffer-local 'w3-draw-buffer)
1033 (make-variable-buffer-local 'w3-current-formatter)
496 (make-variable-buffer-local 'w3-active-faces) 1034 (make-variable-buffer-local 'w3-active-faces)
1035 (make-variable-buffer-local 'w3-default-style)
497 (make-variable-buffer-local 'w3-netscape-emulation-minor-mode) 1036 (make-variable-buffer-local 'w3-netscape-emulation-minor-mode)
498 (make-variable-buffer-local 'w3-lynx-emulation-minor-mode) 1037 (make-variable-buffer-local 'w3-lynx-emulation-minor-mode)
499 (make-variable-buffer-local 'w3-last-search-item) 1038 (make-variable-buffer-local 'w3-last-search-item)
500 1039
501 1040
502 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1041 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
503 ;;; Keymap definitions 1042 ;;; Keymap definitions
504 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1043 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
505 (defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.") 1044 (defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.")
1045 (defvar w3-annotation-minor-mode-map (make-keymap) "Keymap for annotation.")
1046
506 (suppress-keymap w3-mode-map) 1047 (suppress-keymap w3-mode-map)
507 1048
508 (define-key w3-mode-map "h" (make-sparse-keymap)) 1049 (define-key w3-mode-map "h" (make-sparse-keymap))
509 (define-key w3-mode-map "H" (make-sparse-keymap)) 1050 (define-key w3-mode-map "H" (make-sparse-keymap))
510 (define-key w3-mode-map "a" (make-sparse-keymap)) 1051 (define-key w3-mode-map "a" (make-sparse-keymap))
517 (define-key w3-mode-map "hu" 'w3-use-hotlist) 1058 (define-key w3-mode-map "hu" 'w3-use-hotlist)
518 (define-key w3-mode-map "hA" 'w3-hotlist-append) 1059 (define-key w3-mode-map "hA" 'w3-hotlist-append)
519 (define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point) 1060 (define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point)
520 (define-key w3-mode-map "hR" 'w3-hotlist-refresh) 1061 (define-key w3-mode-map "hR" 'w3-hotlist-refresh)
521 1062
522 (define-key w3-mode-map "HF" 'w3-history-forward) 1063 (define-key w3-mode-map "ai" 'w3-annotation-add)
523 (define-key w3-mode-map "HB" 'w3-history-backward) 1064 (define-key w3-mode-map "ad" 'w3-delete-personal-annotation)
1065 (define-key w3-mode-map "ae" 'w3-annotation-edit)
1066
1067 (define-key w3-mode-map "HF" 'w3-forward-in-history)
1068 (define-key w3-mode-map "HB" 'w3-backward-in-history)
524 (define-key w3-mode-map "Hv" 'w3-show-history-list) 1069 (define-key w3-mode-map "Hv" 'w3-show-history-list)
525 1070
526 (define-key w3-mode-map " " 'w3-scroll-up) 1071 (define-key w3-mode-map " " 'w3-scroll-up)
527 (define-key w3-mode-map "<" 'beginning-of-buffer) 1072 (define-key w3-mode-map "<" 'beginning-of-buffer)
528 (define-key w3-mode-map ">" 'end-of-buffer) 1073 (define-key w3-mode-map ">" 'end-of-buffer)
529 (define-key w3-mode-map "?" 'w3-help) 1074 (define-key w3-mode-map "?" 'w3-help)
530 (define-key w3-mode-map "B" 'w3-history-backward) 1075 (define-key w3-mode-map "B" 'w3-backward-in-history)
531 (define-key w3-mode-map "F" 'w3-history-forward) 1076 (define-key w3-mode-map "F" 'w3-forward-in-history)
532 (define-key w3-mode-map "G" 'w3-show-graphics) 1077 (define-key w3-mode-map "G" 'w3-show-graphics)
533 (define-key w3-mode-map "I" 'w3-popup-info) 1078 (define-key w3-mode-map "I" 'w3-popup-info)
534 (define-key w3-mode-map "K" 'w3-save-this-url) 1079 (define-key w3-mode-map "K" 'w3-save-this-url)
535 (define-key w3-mode-map "P" 'w3-print-url-under-point) 1080 (define-key w3-mode-map "P" 'w3-print-url-under-point)
536 (define-key w3-mode-map "Q" 'w3-leave-buffer) 1081 (define-key w3-mode-map "Q" 'w3-leave-buffer)
541 (define-key w3-mode-map "\C-?" 'scroll-down) 1086 (define-key w3-mode-map "\C-?" 'scroll-down)
542 (define-key w3-mode-map "\C-c\C-b" 'w3-show-history-list) 1087 (define-key w3-mode-map "\C-c\C-b" 'w3-show-history-list)
543 (define-key w3-mode-map "\C-c\C-v" 'w3-version) 1088 (define-key w3-mode-map "\C-c\C-v" 'w3-version)
544 (define-key w3-mode-map "\C-o" 'w3-fetch) 1089 (define-key w3-mode-map "\C-o" 'w3-fetch)
545 (define-key w3-mode-map "\M-M" 'w3-mail-document-under-point) 1090 (define-key w3-mode-map "\M-M" 'w3-mail-document-under-point)
1091 (define-key w3-mode-map "\M-\C-i" 'w3-insert-this-url)
546 (define-key w3-mode-map "\M-m" 'w3-mail-current-document) 1092 (define-key w3-mode-map "\M-m" 'w3-mail-current-document)
547 (define-key w3-mode-map "\M-s" 'w3-save-as) 1093 (define-key w3-mode-map "\M-s" 'w3-search)
548 (define-key w3-mode-map "\M-\r" 'w3-follow-inlined-image) 1094 (define-key w3-mode-map "\M-\r" 'w3-follow-inlined-image)
549 (define-key w3-mode-map "\r" 'w3-widget-button-press) 1095 (define-key w3-mode-map "\r" 'w3-widget-button-press)
550 (define-key w3-mode-map "\n" 'w3-widget-button-press) 1096 (define-key w3-mode-map "b" 'widget-backward)
551 (define-key w3-mode-map "b" 'w3-widget-backward)
552 (define-key w3-mode-map "c" 'w3-mail-document-author) 1097 (define-key w3-mode-map "c" 'w3-mail-document-author)
553 (define-key w3-mode-map "f" 'w3-widget-forward) 1098 (define-key w3-mode-map "f" 'widget-forward)
554 (define-key w3-mode-map "g" 'w3-reload-document) 1099 (define-key w3-mode-map "g" 'w3-reload-document)
555 (define-key w3-mode-map "i" 'w3-document-information) 1100 (define-key w3-mode-map "i" 'w3-document-information)
556 (define-key w3-mode-map "k" 'w3-save-url) 1101 (define-key w3-mode-map "k" 'w3-save-url)
557 (define-key w3-mode-map "l" 'w3-goto-last-buffer) 1102 (define-key w3-mode-map "l" 'w3-goto-last-buffer)
558 (define-key w3-mode-map "m" 'w3-complete-link) 1103 (define-key w3-mode-map "m" 'w3-complete-link)
559 (define-key w3-mode-map "n" 'w3-widget-forward) 1104 (define-key w3-mode-map "n" 'widget-forward)
560 (define-key w3-mode-map "o" 'w3-open-local) 1105 (define-key w3-mode-map "o" 'w3-open-local)
561 (define-key w3-mode-map "p" 'w3-print-this-url) 1106 (define-key w3-mode-map "p" 'w3-print-this-url)
562 (define-key w3-mode-map "q" 'w3-quit) 1107 (define-key w3-mode-map "q" 'w3-quit)
563 (define-key w3-mode-map "r" 'w3-reload-document) 1108 (define-key w3-mode-map "r" 'w3-reload-document)
564 (define-key w3-mode-map "s" 'w3-source-document) 1109 (define-key w3-mode-map "s" 'w3-source-document)
569 ;; Emulate some netscape stuff by default 1114 ;; Emulate some netscape stuff by default
570 (define-key w3-mode-map [(control alt t)] 'url-list-processes) 1115 (define-key w3-mode-map [(control alt t)] 'url-list-processes)
571 (define-key w3-mode-map [(control meta t)] 'url-list-processes) 1116 (define-key w3-mode-map [(control meta t)] 'url-list-processes)
572 1117
573 ;; Widget navigation 1118 ;; Widget navigation
574 (define-key w3-mode-map [tab] 'w3-widget-forward) 1119 (define-key w3-mode-map "\t" 'widget-forward)
575 (define-key w3-mode-map "\t" 'w3-widget-forward) 1120 (define-key w3-mode-map [(shift tab)] 'widget-backward)
576 (define-key w3-mode-map "\M-\t" 'w3-widget-backward)
577 (define-key w3-mode-map [backtab] 'w3-widget-backward)
578 (define-key w3-mode-map [(shift tab)] 'w3-widget-backward)
579 (define-key w3-mode-map [(meta tab)] 'w3-widget-backward)
580 1121
1122 (define-key w3-annotation-minor-mode-map "\C-c\C-c"
1123 'w3-personal-annotation-finish)
1124
1125 ;;; This is so we can use a consistent method of checking for mule support
1126 ;;; Emacs-based mule uses (boundp 'MULE), but XEmacs-based mule uses
1127 ;;; (featurep 'mule) - I choose to use the latter.
1128
1129 (if (boundp 'MULE)
1130 (provide 'mule))
581 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1131 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
582 ;;; Keyword definitions 1132 ;;; Keyword definitions
583 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1133 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
584 (require 'w3-keyword) 1134 (require 'w3-keyword)
585 (provide 'w3-vars) 1135 (provide 'w3-vars)