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