0
|
1 ;;; w3-vars.el,v --- All variable definitions for emacs-w3
|
|
2 ;; Author: wmperry
|
46
|
3 ;; Created: 1997/03/26 20:12:26
|
|
4 ;; Version: 1.116
|
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
|
32
|
|
33 (require 'w3-cus) ; Grab everything that is customized
|
|
34
|
0
|
35 (defconst w3-version-number
|
46
|
36 (let ((x "p3.0.75"))
|
0
|
37 (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x)
|
|
38 (setq x (substring x (match-beginning 1) (match-end 1)))
|
|
39 (setq x (substring x 1)))
|
|
40 (mapconcat
|
|
41 (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x ""))
|
|
42 "Version # of w3-mode.")
|
|
43
|
46
|
44 (defconst w3-version-date (let ((x "1997/03/26 20:12:26"))
|
0
|
45 (if (string-match "Date: \\([^ \t\n]+\\)" x)
|
|
46 (substring x (match-beginning 1) (match-end 1))
|
|
47 x))
|
|
48 "Date this version of w3-mode was released.")
|
|
49
|
|
50 (defconst w3-version
|
|
51 (format "WWW %s %s" w3-version-number w3-version-date)
|
|
52 "More descriptive version of w3-version-number.")
|
|
53
|
|
54 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
55 ;;; General configuration variables
|
|
56 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
57 (defvar w3-dump-to-disk nil
|
|
58 "*If non-nil, all W3 pages loaded will be dumped to disk.")
|
|
59
|
16
|
60 (defvar w3-fetch-with-default t
|
|
61 "*Whether `w3-fetch' should determine a good starting URL as a default.")
|
|
62
|
0
|
63 (defvar w3-track-last-buffer nil
|
|
64 "*Whether to track the last w3 buffer to automatically switch to with
|
|
65 M-x w3.")
|
|
66
|
|
67 (defvar w3-gc-cons-threshold-multiplier 1
|
|
68 "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
|
|
70 garbage collections when parsing an HTML document, which may often speed
|
|
71 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
|
|
73 in later garbage collections taking more time.")
|
|
74
|
|
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
76 ;;; Figure out what flavor of emacs we are running
|
|
77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
78 (defvar w3-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
|
2
|
79 "*In XEmacs?.")
|
0
|
80
|
|
81 (defvar w3-running-FSF19 (and (string-match "^19" emacs-version)
|
|
82 (not w3-running-xemacs))
|
|
83 "*In FSF v19 emacs?")
|
|
84
|
|
85 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
32
|
86 ;; Store the database of HTML general entities.
|
0
|
87 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
88 (defvar w3-html-entities
|
|
89 '(
|
|
90 (excl . 33)
|
|
91 (quot . 34)
|
|
92 (num . 35)
|
|
93 (dollar . 36)
|
|
94 (percent . 37)
|
|
95 (amp . 38)
|
|
96 (rsquo . 39)
|
|
97 (apos . 39)
|
|
98 (lpar . 40)
|
|
99 (rpar . 41)
|
|
100 (times . 42)
|
|
101 (ast . 42)
|
|
102 (plus . 43)
|
|
103 (comma . 44)
|
|
104 (period . 46)
|
|
105 (colon . 58)
|
|
106 (semi . 59)
|
|
107 (lt . 60)
|
|
108 (equals . 61)
|
|
109 (gt . 62)
|
|
110 (quest . 63)
|
|
111 (commat . 64)
|
|
112 (lsqb . 91)
|
|
113 (rsqb . 93)
|
|
114 (uarr . 94)
|
|
115 (lowbar . 95)
|
|
116 (lsquo . 96)
|
|
117 (lcub . 123)
|
|
118 (verbar . 124)
|
|
119 (rcub . 125)
|
|
120 (tilde . 126)
|
|
121 (nbsp . 160)
|
|
122 (iexcl . 161)
|
|
123 (cent . 162)
|
|
124 (pound . 163)
|
|
125 (curren . 164)
|
|
126 (yen . 165)
|
|
127 (brvbar . 166)
|
|
128 (sect . 167)
|
|
129 (uml . 168)
|
|
130 (copy . 169)
|
|
131 (ordf . 170)
|
|
132 (laquo . 171)
|
|
133 (not . 172)
|
|
134 (shy . 173)
|
|
135 (reg . 174)
|
|
136 (macr . 175)
|
|
137 (deg . 176)
|
|
138 (plusmn . 177)
|
|
139 (sup2 . 178)
|
|
140 (sup3 . 179)
|
|
141 (acute . 180)
|
|
142 (micro . 181)
|
|
143 (para . 182)
|
|
144 (middot . 183)
|
|
145 (cedil . 184)
|
|
146 (sup1 . 185)
|
|
147 (ordm . 186)
|
|
148 (raquo . 187)
|
|
149 (frac14 . 188)
|
|
150 (frac12 . 189)
|
|
151 (frac34 . 190)
|
|
152 (iquest . 191)
|
|
153 (Agrave . 192)
|
|
154 (Aacute . 193)
|
|
155 (Acirc . 194)
|
|
156 (Atilde . 195)
|
|
157 (Auml . 196)
|
|
158 (Aring . 197)
|
|
159 (AElig . 198)
|
|
160 (Ccedil . 199)
|
|
161 (Egrave . 200)
|
|
162 (Eacute . 201)
|
|
163 (Ecirc . 202)
|
|
164 (Euml . 203)
|
|
165 (Igrave . 204)
|
|
166 (Iacute . 205)
|
|
167 (Icirc . 206)
|
|
168 (Iuml . 207)
|
|
169 (ETH . 208)
|
|
170 (Ntilde . 209)
|
|
171 (Ograve . 210)
|
|
172 (Oacute . 211)
|
|
173 (Ocirc . 212)
|
|
174 (Otilde . 213)
|
|
175 (Ouml . 214)
|
|
176 (times . 215)
|
|
177 (Oslash . 216)
|
|
178 (Ugrave . 217)
|
|
179 (Uacute . 218)
|
|
180 (Ucirc . 219)
|
|
181 (Uuml . 220)
|
|
182 (Yacute . 221)
|
|
183 (THORN . 222)
|
|
184 (szlig . 223)
|
|
185 (agrave . 224)
|
|
186 (aacute . 225)
|
|
187 (acirc . 226)
|
|
188 (atilde . 227)
|
|
189 (auml . 228)
|
|
190 (aring . 229)
|
|
191 (aelig . 230)
|
|
192 (ccedil . 231)
|
|
193 (egrave . 232)
|
|
194 (eacute . 233)
|
|
195 (ecirc . 234)
|
|
196 (euml . 235)
|
|
197 (igrave . 236)
|
|
198 (iacute . 237)
|
|
199 (icirc . 238)
|
|
200 (iuml . 239)
|
|
201 (eth . 240)
|
|
202 (ntilde . 241)
|
|
203 (ograve . 242)
|
|
204 (oacute . 243)
|
|
205 (ocirc . 244)
|
|
206 (otilde . 245)
|
|
207 (ouml . 246)
|
|
208 (divide . 247)
|
|
209 (oslash . 248)
|
|
210 (ugrave . 249)
|
|
211 (uacute . 250)
|
|
212 (ucirc . 251)
|
|
213 (uuml . 252)
|
|
214 (yacute . 253)
|
|
215 (thorn . 254)
|
|
216 (yuml . 255)
|
|
217
|
|
218 ;; Special handling of these
|
|
219 (frac56 . "5/6")
|
|
220 (frac16 . "1/6")
|
|
221 (frac45 . "4/5")
|
|
222 (frac35 . "3/5")
|
|
223 (frac25 . "2/5")
|
|
224 (frac15 . "1/5")
|
|
225 (frac23 . "2/3")
|
|
226 (frac13 . "1/3")
|
|
227 (frac78 . "7/8")
|
|
228 (frac58 . "5/8")
|
|
229 (frac38 . "3/8")
|
|
230 (frac18 . "1/8")
|
|
231
|
|
232 ;; The following 5 entities are not mentioned in the HTML 2.0
|
|
233 ;; standard, nor in any other HTML proposed standard of which I
|
|
234 ;; am aware. I am not even sure they are ISO entity names. ***
|
|
235 ;; Hence, some arrangement should be made to give a bad HTML
|
|
236 ;; message when they are seen.
|
|
237 (ndash . 45)
|
|
238 (mdash . 45)
|
|
239 (emsp . 32)
|
|
240 (ensp . 32)
|
|
241 (sim . 126)
|
|
242 (le . "<=")
|
|
243 (agr . "alpha")
|
|
244 (rdquo . "''")
|
|
245 (ldquo . "``")
|
|
246 (trade . "(TM)")
|
|
247 ;; To be done
|
|
248 ;; (shy . ????) ; soft hyphen
|
|
249 )
|
|
250 "*An assoc list of entity names and how to actually display them.")
|
|
251
|
|
252 (defvar w3-graphic-entities
|
|
253 '(
|
|
254 (archive "archive" )
|
|
255 (audio "audio" )
|
|
256 (binary.document "binary.document" )
|
|
257 (binhex.document "binhex.document" )
|
|
258 (calculator "calculator" )
|
|
259 (caution "caution" )
|
|
260 (cd.i "cd.i" )
|
|
261 (cd.rom "cd.rom" )
|
|
262 (clock "clock" )
|
|
263 (compressed.document "compressed.document" )
|
|
264 (disk.drive "disk.drive" )
|
|
265 (diskette "diskette" )
|
|
266 (document "document" )
|
|
267 (fax "fax" )
|
|
268 (filing.cabinet "filing.cabinet" )
|
|
269 (film "film" )
|
|
270 (fixed.disk "fixed.disk" )
|
|
271 (folder "folder" )
|
|
272 (form "form" )
|
|
273 (ftp "ftp" )
|
|
274 (glossary "glossary" )
|
|
275 (gopher "gopher" )
|
|
276 (home "home" )
|
|
277 (html "html" )
|
|
278 (image "image" )
|
|
279 (index "index" )
|
|
280 (keyboard "keyboard" )
|
|
281 (mail "mail" )
|
|
282 (mail.in "mail.in" )
|
|
283 (mail.out "mail.out" )
|
|
284 (map "map" )
|
|
285 (mouse "mouse" )
|
|
286 (new "new" )
|
|
287 (next "next" )
|
|
288 (notebook "notebook" )
|
|
289 (parent "parent" )
|
|
290 (play.fast.forward "play.fast.forward" )
|
|
291 (play.fast.reverse "play.fast.reverse" )
|
|
292 (play.pause "play.pause" )
|
|
293 (play.start "play.start" )
|
|
294 (play.stop "play.stop" )
|
|
295 (previous "previous" )
|
2
|
296 (prince "prince" "the artist formerly known as prince")
|
|
297 (princesymbol "prince" "the artist formerly known as prince")
|
0
|
298 (printer "printer" )
|
|
299 (sadsmiley "sadsmiley" ":(")
|
|
300 (smiley "smiley" ":)")
|
|
301 (stop "stop" )
|
|
302 (summary "summary" )
|
|
303 (telephone "telephone" )
|
|
304 (telnet "telnet" )
|
|
305 (text.document "text.document" )
|
|
306 (tn3270 "tn3270" )
|
|
307 (toc "toc" )
|
|
308 (trash "trash" )
|
|
309 (unknown.document "unknown.document" )
|
|
310 (uuencoded.document "uuencoded.document" )
|
|
311 (work "work" )
|
|
312 (www "www" )
|
|
313 )
|
|
314 "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
|
|
316 for the image.")
|
|
317
|
|
318 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
319 ;;; Menu definitions
|
|
320 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
321 (defvar w3-popup-menu
|
|
322 '("Emacs-W3 Commands"
|
20
|
323 ["Back" w3-history-backward (car (w3-history-find-url-internal (url-view-url t)))]
|
|
324 ["Forward" w3-history-forward (cdr (w3-history-find-url-internal (url-view-url t)))]
|
32
|
325 "---"
|
|
326 ["Reload" (w3-reload-document) t]
|
|
327 ["Show Images" (w3-load-delayed-images) w3-delayed-images]
|
|
328 "---"
|
|
329 ["Add bookmark" (w3-hotlist-add-document nil) t]
|
0
|
330 )
|
|
331 "The shorter popup menu.")
|
|
332
|
|
333 (defvar w3-graphlink-menu
|
|
334 '(("Open this Image (%s)" . w3-fetch)
|
|
335 ("Save this Image As..." . w3-download-url)
|
|
336 ("Copy this Image Location" . w3-save-url)
|
|
337 ("Information on this Image". w3-popup-image-info))
|
|
338 "An assoc list of function names and labels. These will be displayed
|
|
339 in a popup menu when the mouse is pressed on a hyperlink. Format is
|
|
340 ( (label . function)), function is called with one argument, the URL of
|
|
341 the link. Each label can have exactly one `%s' that will be replaced by
|
|
342 the URL of the link.")
|
|
343
|
|
344 (defvar w3-hyperlink-menu
|
|
345 '(("Open this Link (%s)" . w3-fetch)
|
32
|
346 ("Add Bookmark for this Link" . w3-hotlist-add-document-at-point)
|
0
|
347 ("New Window with this Link" . w3-fetch-other-frame)
|
|
348 ("Save Link As..." . w3-download-url)
|
|
349 ("Copy this Link Location to Clipboard" . w3-save-url)
|
|
350 ("Information on this Link" . w3-popup-info))
|
|
351 "An assoc list of function names and labels. These will be displayed
|
|
352 in a popup menu when the mouse is pressed on a hyperlink. Format is
|
|
353 ( (label . function)), function is called with one argument, the URL of
|
|
354 the link. Each label can have exactly one `%s' that will be replaced by
|
|
355 the URL of the link.")
|
|
356
|
|
357 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
358 ;;; Variables internal to W3, you should not change any of these
|
|
359 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
32
|
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
|
38
|
368 "Frameset structure, heap of '(frameset ({cols|rows} \"<dimensions>\")) and '(<frame name> <href>)")
|
32
|
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
|
0
|
379 (defvar w3-form-radio-elements nil "Internal variable - do not touch!")
|
|
380 (defvar w3-form-elements nil "Internal variable - do not touch!")
|
|
381
|
|
382 (defvar w3-user-stylesheet nil
|
|
383 "The global stylesheet for this user.")
|
|
384
|
|
385 (defvar w3-current-stylesheet nil
|
|
386 "The stylesheet for this document.")
|
|
387
|
|
388 (defvar w3-blinking-buffs nil
|
|
389 "A list of buffers with blinking text in them.
|
|
390 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
|
|
392 displaying blinking text or not.")
|
|
393
|
|
394 (defvar w3-last-fill-pos nil
|
|
395 "An internal variable for the new display engine that specifies the
|
|
396 last character position that was correctly filled.")
|
|
397
|
|
398 (defvar w3-active-faces nil "The list of active faces.")
|
|
399 (defvar w3-active-voices nil "The list of active voices.")
|
|
400
|
2
|
401 (defconst w3-bug-address "wmperry@cs.indiana.edu"
|
|
402 "Address of current maintainer, where to send bug reports.")
|
0
|
403 (defvar w3-continuation '(url-uncompress url-clean-text)
|
|
404 "List of functions to call to process a document completely.")
|
|
405 (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.")
|
14
|
407 (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.")
|
0
|
409 (defvar w3-current-source nil "Source of current document.")
|
|
410 (defvar w3-current-parse nil "Parsed version of current document.")
|
|
411 (defconst w3-default-continuation '(url-uncompress url-clean-text)
|
|
412 "Default action to start with - cleans text and uncompresses if necessary.")
|
|
413 (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.")
|
|
415 (defvar w3-hotlist nil "Default hotlist.")
|
|
416 (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.")
|
|
418 (defvar w3-print-next nil "Should we latex & print the next doc?")
|
|
419 (defvar w3-roman-characters "ivxLCDMVX" "Roman numerals.")
|
|
420 (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?")
|
|
422
|
|
423 (defvar w3-strict-width nil
|
|
424 "*This variable will control how wide emacs thinks the current window is.
|
|
425 This is useful when working in batch mode, and (window-width) returns the
|
|
426 wrong value. If the value is nil, it will use the value (window-width)
|
|
427 returns.")
|
|
428
|
|
429 (defvar w3-submit-button nil
|
|
430 "A widget object specifying what button was pressed to submit a form.")
|
|
431
|
|
432 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
433 ;;; buffer-local variables to keep around when going into w3-mode
|
|
434 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
435 (defvar w3-id-positions nil "Internal use only.")
|
|
436 (defvar w3-imagemaps nil "Internal use only.")
|
|
437
|
|
438 (defvar w3-persistent-variables
|
|
439 '(
|
|
440 ;; So we can show the URL in the list-buffers listing
|
|
441 list-buffers-directory
|
|
442 ;; So widgets don't get lost
|
|
443 widget-field-new
|
|
444 w3-form-radio-elements
|
|
445 w3-form-elements
|
|
446 url-current-callback-func
|
|
447 url-current-content-length
|
|
448 url-current-mime-encoding
|
|
449 url-current-mime-headers
|
|
450 url-current-mime-type
|
|
451 url-current-mime-viewer
|
26
|
452 url-current-object
|
0
|
453 url-current-referer
|
|
454 w3-current-parse
|
|
455 w3-current-isindex
|
|
456 w3-current-last-buffer
|
|
457 w3-current-links
|
14
|
458 w3-current-metainfo
|
0
|
459 w3-current-source
|
|
460 w3-delayed-images
|
|
461 w3-hidden-forms
|
|
462 w3-current-stylesheet
|
|
463 w3-form-labels
|
|
464 w3-id-positions
|
|
465 w3-imagemaps
|
26
|
466 w3-base-target
|
|
467 w3-target-window-distances
|
|
468 w3-frameset-structure
|
0
|
469 )
|
|
470 "A list of variables that should be preserved when entering w3-mode.")
|
|
471
|
|
472 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
473 ;;; Emulation stuff
|
|
474 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
475 (defvar w3-netscape-emulation-minor-mode nil
|
|
476 "Whether we are in the netscape emulation minor mode.")
|
|
477 (defvar w3-netscape-emulation-minor-mode-map (make-sparse-keymap)
|
|
478 "Keymap for netscape emulation.")
|
|
479 (defvar w3-lynx-emulation-minor-mode nil
|
|
480 "Whether we are in the lynx emulation minor mode.")
|
|
481 (defvar w3-lynx-emulation-minor-mode-map (make-sparse-keymap)
|
|
482 "Keymap for lynx emulation.")
|
|
483 (defvar w3-last-search-item nil)
|
|
484
|
|
485 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
486 ;;; Startup items
|
|
487 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
488 (defvar w3-form-labels nil "")
|
|
489 (mapcar (function
|
|
490 (lambda (var)
|
|
491 (if (boundp var)
|
|
492 (make-variable-buffer-local var)))) w3-persistent-variables)
|
22
|
493
|
0
|
494 (make-variable-buffer-local 'w3-last-fill-pos)
|
26
|
495 (make-variable-buffer-local 'w3-frame-name)
|
0
|
496 (make-variable-buffer-local 'w3-active-faces)
|
|
497 (make-variable-buffer-local 'w3-netscape-emulation-minor-mode)
|
|
498 (make-variable-buffer-local 'w3-lynx-emulation-minor-mode)
|
|
499 (make-variable-buffer-local 'w3-last-search-item)
|
|
500
|
|
501
|
|
502 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
503 ;;; Keymap definitions
|
|
504 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
505 (defvar w3-mode-map (make-keymap) "Keymap to use in w3-mode.")
|
|
506 (suppress-keymap w3-mode-map)
|
|
507
|
|
508 (define-key w3-mode-map "h" (make-sparse-keymap))
|
|
509 (define-key w3-mode-map "H" (make-sparse-keymap))
|
|
510 (define-key w3-mode-map "a" (make-sparse-keymap))
|
|
511
|
|
512 (define-key w3-mode-map "ha" 'w3-hotlist-apropos)
|
|
513 (define-key w3-mode-map "hd" 'w3-hotlist-delete)
|
|
514 (define-key w3-mode-map "hi" 'w3-hotlist-add-document)
|
|
515 (define-key w3-mode-map "hv" 'w3-show-hotlist)
|
|
516 (define-key w3-mode-map "hr" 'w3-hotlist-rename-entry)
|
|
517 (define-key w3-mode-map "hu" 'w3-use-hotlist)
|
|
518 (define-key w3-mode-map "hA" 'w3-hotlist-append)
|
|
519 (define-key w3-mode-map "hI" 'w3-hotlist-add-document-at-point)
|
|
520 (define-key w3-mode-map "hR" 'w3-hotlist-refresh)
|
|
521
|
20
|
522 (define-key w3-mode-map "HF" 'w3-history-forward)
|
|
523 (define-key w3-mode-map "HB" 'w3-history-backward)
|
0
|
524 (define-key w3-mode-map "Hv" 'w3-show-history-list)
|
|
525
|
|
526 (define-key w3-mode-map " " 'w3-scroll-up)
|
|
527 (define-key w3-mode-map "<" 'beginning-of-buffer)
|
|
528 (define-key w3-mode-map ">" 'end-of-buffer)
|
|
529 (define-key w3-mode-map "?" 'w3-help)
|
20
|
530 (define-key w3-mode-map "B" 'w3-history-backward)
|
|
531 (define-key w3-mode-map "F" 'w3-history-forward)
|
0
|
532 (define-key w3-mode-map "G" 'w3-show-graphics)
|
|
533 (define-key w3-mode-map "I" 'w3-popup-info)
|
|
534 (define-key w3-mode-map "K" 'w3-save-this-url)
|
|
535 (define-key w3-mode-map "P" 'w3-print-url-under-point)
|
|
536 (define-key w3-mode-map "Q" 'w3-leave-buffer)
|
|
537 (define-key w3-mode-map "R" 'w3-refresh-buffer)
|
|
538 (define-key w3-mode-map "S" 'w3-source-document-at-point)
|
|
539 (define-key w3-mode-map "U" 'w3-use-links)
|
|
540 (define-key w3-mode-map "V" 'w3-view-this-url)
|
|
541 (define-key w3-mode-map "\C-?" 'scroll-down)
|
|
542 (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)
|
|
544 (define-key w3-mode-map "\C-o" 'w3-fetch)
|
|
545 (define-key w3-mode-map "\M-M" 'w3-mail-document-under-point)
|
|
546 (define-key w3-mode-map "\M-m" 'w3-mail-current-document)
|
30
|
547 (define-key w3-mode-map "\M-s" 'w3-save-as)
|
0
|
548 (define-key w3-mode-map "\M-\r" 'w3-follow-inlined-image)
|
|
549 (define-key w3-mode-map "\r" 'w3-widget-button-press)
|
16
|
550 (define-key w3-mode-map "\n" 'w3-widget-button-press)
|
14
|
551 (define-key w3-mode-map "b" 'w3-widget-backward)
|
0
|
552 (define-key w3-mode-map "c" 'w3-mail-document-author)
|
14
|
553 (define-key w3-mode-map "f" 'w3-widget-forward)
|
0
|
554 (define-key w3-mode-map "g" 'w3-reload-document)
|
|
555 (define-key w3-mode-map "i" 'w3-document-information)
|
|
556 (define-key w3-mode-map "k" 'w3-save-url)
|
|
557 (define-key w3-mode-map "l" 'w3-goto-last-buffer)
|
|
558 (define-key w3-mode-map "m" 'w3-complete-link)
|
14
|
559 (define-key w3-mode-map "n" 'w3-widget-forward)
|
0
|
560 (define-key w3-mode-map "o" 'w3-open-local)
|
|
561 (define-key w3-mode-map "p" 'w3-print-this-url)
|
|
562 (define-key w3-mode-map "q" 'w3-quit)
|
|
563 (define-key w3-mode-map "r" 'w3-reload-document)
|
|
564 (define-key w3-mode-map "s" 'w3-source-document)
|
|
565 (define-key w3-mode-map "u" 'w3-leave-buffer)
|
|
566 (define-key w3-mode-map "v" 'url-view-url)
|
|
567 (define-key w3-mode-map "w" 'w3-submit-bug)
|
|
568
|
|
569 ;; Emulate some netscape stuff by default
|
|
570 (define-key w3-mode-map [(control alt t)] 'url-list-processes)
|
|
571 (define-key w3-mode-map [(control meta t)] 'url-list-processes)
|
|
572
|
|
573 ;; Widget navigation
|
22
|
574 (define-key w3-mode-map [tab] 'w3-widget-forward)
|
26
|
575 (define-key w3-mode-map "\t" 'w3-widget-forward)
|
22
|
576 (define-key w3-mode-map "\M-\t" 'w3-widget-backward)
|
20
|
577 (define-key w3-mode-map [backtab] 'w3-widget-backward)
|
14
|
578 (define-key w3-mode-map [(shift tab)] 'w3-widget-backward)
|
20
|
579 (define-key w3-mode-map [(meta tab)] 'w3-widget-backward)
|
0
|
580
|
|
581 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
582 ;;; Keyword definitions
|
|
583 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
584 (require 'w3-keyword)
|
|
585 (provide 'w3-vars)
|