annotate lisp/w3/w3-emulate.el @ 14:9ee227acff29 r19-15b90

Import from CVS: tag r19-15b90
author cvs
date Mon, 13 Aug 2007 08:48:42 +0200
parents ac2d302a0011
children 0293115a14e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
1 ;;; w3-emulate.el --- All variable definitions for emacs-w3
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;; Author: wmperry
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
3 ;; Created: 1996/10/09 19:00:59
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
4 ;; Version: 1.4
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Keywords: comm, help, hypermedia
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu)
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
9 ;;; Copyright (c) 1996 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;;
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
11 ;;; This file is part of GNU Emacs.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;; GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;; You should have received a copy of the GNU General Public License
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
24 ;;; along with GNU Emacs; see the file COPYING. If not, write to the
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
25 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
26 ;;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; Provide emulations of various other web browsers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (require 'w3-vars)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;; First, we emulate Netscape 2.x
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;; ------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;; This entails mainly a few new keybindings.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;; Alt-S == Save As
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;; Alt-M == New Mail Message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 ;; Alt-N == New Window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 ;; Alt-L == Open Location
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;; Alt-O == Open File
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;; Alt-P == Print
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 ;; Alt-Q == Quit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 ;; Alt-F == Search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;; Alt-G == Search Again
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 ;; Alt-R == Reload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 ;; Alt-I == Load Images
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 ;; Alt-A == Add Bookmark
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;; Alt-B == Show Bookmark Window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;; Alt-H == Show History Window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;; Alt-Left == Back
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 ;; Alt-Right== Forward
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 ;; Right == Scroll left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ;; Left == Scroll right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 ;; Up == Smooth scroll up
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 ;; Down == Smooth scroll down
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (define-key w3-netscape-emulation-minor-mode-map "\M-s" 'w3-save-as)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (define-key w3-netscape-emulation-minor-mode-map "\M-m" 'w3-mailto)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (define-key w3-netscape-emulation-minor-mode-map "\M-n" 'make-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (define-key w3-netscape-emulation-minor-mode-map "\M-l" 'w3-fetch)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (define-key w3-netscape-emulation-minor-mode-map "\M-o" 'w3-open-local)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 (define-key w3-netscape-emulation-minor-mode-map "\M-p" 'w3-print-this-url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (define-key w3-netscape-emulation-minor-mode-map "\M-q" 'w3-quit)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (define-key w3-netscape-emulation-minor-mode-map "\M-f" 'w3-search-forward)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (define-key w3-netscape-emulation-minor-mode-map "\M-g" 'w3-search-again)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (define-key w3-netscape-emulation-minor-mode-map "\M-r" 'w3-reload-document)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (define-key w3-netscape-emulation-minor-mode-map "\M-i" 'w3-load-delayed-images)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (define-key w3-netscape-emulation-minor-mode-map "\M-a" 'w3-hotlist-add-document)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (define-key w3-netscape-emulation-minor-mode-map "\M-b" 'w3-show-hotlist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 (define-key w3-netscape-emulation-minor-mode-map "\M-h" 'w3-show-history-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (define-key w3-netscape-emulation-minor-mode-map [up]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (function (lambda () (interactive) (scroll-down 1))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (define-key w3-netscape-emulation-minor-mode-map [down]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (function (lambda () (interactive) (scroll-up 1))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (define-key w3-netscape-emulation-minor-mode-map [right] 'scroll-left)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (define-key w3-netscape-emulation-minor-mode-map [left] 'scroll-right)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (define-key w3-netscape-emulation-minor-mode-map [(meta left)]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 'w3-backward-in-history)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (define-key w3-netscape-emulation-minor-mode-map [(meta right)]
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 'w3-forward-in-history)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (defun turn-on-netscape-emulation ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (w3-lynx-emulation-minor-mode 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 (w3-netscape-emulation-minor-mode 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (defun w3-netscape-emulation-minor-mode (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 "Minor mode for emulating netscape key navigation."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 ((null arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (setq w3-netscape-emulation-minor-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (not w3-netscape-emulation-minor-mode))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (if w3-netscape-emulation-minor-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (setq w3-lynx-emulation-minor-mode nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 ((= 0 arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (setq w3-netscape-emulation-minor-mode nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (setq w3-lynx-emulation-minor-mode nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 w3-netscape-emulation-minor-mode t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (defsubst w3-skip-word ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (skip-chars-forward "^ \t\n\r")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (skip-chars-forward " \t"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (defun w3-read-netscape-config (&optional fname)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 "Read in a netscape-style configuration file."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (interactive "fNetscape configuration file: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 (if (not (and (file-exists-p fname)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (file-readable-p fname)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (error "Could not read %s" fname))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (let ((results nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (tag nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (val nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (var nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (save-pos nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (set-buffer (get-buffer-create " *w3-tmp*"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (insert-file-contents-literally fname)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (skip-chars-forward "^ \t\r\n") ; Skip tag line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 (skip-chars-forward " \t\r\n") ; Skip blank line(s)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (while (not (eobp))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (setq save-pos (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (skip-chars-forward "^:")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (upcase-region save-pos (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (setq tag (buffer-substring save-pos (point)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (skip-chars-forward ":\t ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (setq save-pos (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 (skip-chars-forward "^\r\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (setq val (if (= save-pos (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (buffer-substring save-pos (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 ((null val) nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 ((string-match "^[0-9]+$" val)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (setq val (string-to-int val)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 ((string= "false" (downcase val))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (setq val nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 ((string= "true" (downcase val))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (setq val t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (t nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (skip-chars-forward " \t\n\r")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (setq results (cons (cons tag val) results))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (while results
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (setq tag (car (car results))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 val (cdr (car results))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 var (cdr-safe (assoc tag w3-netscape-variable-mappings))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 results (cdr results))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 ((eq var 'w3-delay-image-loads) (set var (not val)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (var (set var val))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 (t nil)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 ;; Now, lets try Lynx
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 ;; ------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 ;; A few keybindings and modifications to some default functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (defun turn-on-lynx-emulation ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (w3-netscape-emulation-minor-mode 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (w3-lynx-emulation-minor-mode 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (defun w3-lynx-emulation-minor-mode (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 "Minor mode for emulating lynx key navigation."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 ((null arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (setq w3-lynx-emulation-minor-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (not w3-lynx-emulation-minor-mode))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 (if w3-lynx-emulation-minor-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (setq w3-netscape-emulation-minor-mode nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 ((= 0 arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (setq w3-lynx-emulation-minor-mode nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (setq w3-lynx-emulation-minor-mode t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 w3-netscape-emulation-minor-mode nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 (define-key w3-lynx-emulation-minor-mode-map "+" 'w3-scroll-up)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 (define-key w3-lynx-emulation-minor-mode-map "-" 'scroll-down)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (define-key w3-lynx-emulation-minor-mode-map "b" 'scroll-down)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (define-key w3-lynx-emulation-minor-mode-map "a" 'w3-hotlist-add-document)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (define-key w3-lynx-emulation-minor-mode-map "c" 'w3-mail-document-author)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 (define-key w3-lynx-emulation-minor-mode-map "e" 'w3-edit-source)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 (define-key w3-lynx-emulation-minor-mode-map "g" 'w3-fetch)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 (define-key w3-lynx-emulation-minor-mode-map "i" 'ignore)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (define-key w3-lynx-emulation-minor-mode-map "m" 'w3)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (define-key w3-lynx-emulation-minor-mode-map "o" 'ignore)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (define-key w3-lynx-emulation-minor-mode-map "p" 'w3-print-this-url)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (define-key w3-lynx-emulation-minor-mode-map "q" 'w3-quit)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (define-key w3-lynx-emulation-minor-mode-map "/" 'w3-search-forward)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 (define-key w3-lynx-emulation-minor-mode-map "s" 'w3-search-forward)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 (define-key w3-lynx-emulation-minor-mode-map "n" 'w3-search-again)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (define-key w3-lynx-emulation-minor-mode-map "v" 'w3-show-hotlist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (define-key w3-lynx-emulation-minor-mode-map "=" 'w3-document-information)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (define-key w3-lynx-emulation-minor-mode-map "\C-r" 'w3-reload-document)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (define-key w3-lynx-emulation-minor-mode-map "\C-w" 'w3-refresh-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 (define-key w3-lynx-emulation-minor-mode-map "\\" 'w3-source-document)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 (define-key w3-lynx-emulation-minor-mode-map "!" 'shell)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 (define-key w3-lynx-emulation-minor-mode-map [up] 'w3-back-link)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (define-key w3-lynx-emulation-minor-mode-map [down] 'w3-forward-link)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (define-key w3-lynx-emulation-minor-mode-map [right] 'w3-follow-link)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (define-key w3-lynx-emulation-minor-mode-map [left] 'w3-backward-in-history)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 (provide 'w3-emulate)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ;;; Local Variables:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 ;;; truncate-lines: t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 ;;; End: