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