annotate lisp/w3/w3-speak.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents 0293115a14e9
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
1 ;;; w3-speak.el,v --- Emacs-W3 speech interface
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
2 ;; Author: wmperry
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
3 ;; Original author: William Perry --<wmperry@cs.indiana.edu>
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
4 ;; Cloned from emacspeak-w3.el
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
5 ;; Created: 1996/10/16 20:56:40
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
6 ;; Version: 1.14
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; Keywords: hypermedia, speech
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
8
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
10 ;;; Copyright (c) 1996 by T.V. Raman (raman@adobe.com)
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
11 ;;; Copyright (c) 1996, 1997 by William M. Perry (wmperry@spry.com)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
12 ;;; Copyright (c) 1997 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; This file is not part of GNU Emacs, but the same permissions apply.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;; 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
27 ;;; 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
28 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
29 ;;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;;; A replacement module for emacspeak-w3 that uses all the new functionality
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;;; of Emacs-W3 3.0.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;;; This file would not be possible without the help of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;;; T.V. Raman (raman@adobe.com) and his continued efforts to make Emacs-W3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;;; even remotely useful. :)
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
39 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
40
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
41 ;;; This conforms to http://www4.inria.fr/speech2.html
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (require 'widget)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (require 'w3-forms)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (require 'advice)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 ;; This condition-case needs to be here or it completely chokes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;; byte-compilation for people who do not have Emacspeak installed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 ;; *sigh*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (condition-case ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (require 'emacspeak)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (require 'dtk-voices)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (require 'emacspeak-speak)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (require 'emacspeak-sounds)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (eval-when (compile)
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
56 (require 'emacspeak-fix-interactive)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (error (message "Emacspeak not found - speech will not work.")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
60 ;;{{{ speaking form fields
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;;; Now for the guts
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (defun w3-speak-summarize-form-field ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 "Summarizes field under point if any."
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
67 (let ((widget (widget-at (point))))
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
68 (and widget (w3-form-summarize-field widget))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
69
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 ;;}}}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 ;;; Movement notification
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
75 (defadvice w3-widget-forward (after emacspeak pre act comp)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
76 (when (interactive-p)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
77 (emacspeak-auditory-icon 'large-movement)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
78 (emacspeak-widget-summarize (emacspeak-widget-at (point )))))
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
79
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
80
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
81 (defadvice w3-widget-backward (after emacspeak pre act comp)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
82 (when (interactive-p)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
83 (emacspeak-auditory-icon 'large-movement)
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
84 (emacspeak-widget-summarize (emacspeak-widget-at (point )))))
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 14
diff changeset
85
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (defadvice w3-scroll-up (after emacspeak pre act comp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 "Provide auditory feedback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (when (interactive-p)
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
89 (let ((start (point )))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
90 (emacspeak-auditory-icon 'scroll)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
91 (save-excursion
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
92 (forward-line (window-height))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
93 (emacspeak-speak-region start (point ))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (defadvice w3-follow-link (around emacspeak pre act)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 "Provide feedback on what you did. "
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
97 (let ((data (emacspeak-w3-extract-form-field-information))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
98 (form-field-p nil)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
99 (this-zone nil)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
100 (opoint nil))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 (if data
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
102 (setq form-field-p t
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
103 opoint (point)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 ad-do-it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (when form-field-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (w3-speak-summarize-form-field)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (case (w3-form-element-type data)
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
108 ((radio checkbox)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (emacspeak-auditory-icon 'button))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 ;; fill in any others here
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (otherwise
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 nil)))
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
113 ad-return-value))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 (defadvice w3-revert-form (after emacspeak pre act)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 "Announce that you cleared the form. "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (dtk-speak "Cleared the form. "))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (defadvice w3-finish-text-entry (after emacspeak pre act )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 "Announce what the field was set to."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (when (interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (w3-speak-summarize-form-field)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (defadvice w3-start-of-document (after emacspeak pre act)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 "Produce an auditory icon. Also speak the first line. "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (when (interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (emacspeak-speak-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (emacspeak-auditory-icon 'large-movement)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (defadvice w3-end-of-document (after emacspeak pre act)
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
131 "Produce an auditory icon. Also speak the first line."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (when (interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (emacspeak-speak-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (emacspeak-auditory-icon 'large-movement)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (defadvice w3-goto-last-buffer (after emacspeak pre act)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 "Speak the modeline so I know where I am."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (when (interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (emacspeak-auditory-icon 'select-object)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (emacspeak-speak-mode-line)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (defadvice w3-quit (after emacspeak pre act)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 "Speak the mode line of the new buffer."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (when (interactive-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (emacspeak-auditory-icon 'close-object)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (emacspeak-speak-mode-line)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (defadvice w3-fetch (around emacspeak act comp )
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
149 "First produce an auditory icon to indicate retrieval.
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
150 After retrieval,
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
151 set voice-lock-mode to t after displaying the buffer,
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
152 and then speak the mode-line. "
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (declare (special dtk-punctuation-mode))
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
154 (emacspeak-auditory-icon 'select-object)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
155 ad-do-it)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (defun w3-speak-mode-hook ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (set (make-local-variable 'voice-lock-mode) t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (setq dtk-punctuation-mode "some")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 (emacspeak-auditory-icon 'open-object)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (emacspeak-speak-mode-line))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 ;;; This is really the only function you should need to call unless
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 ;;; you are adding functionality.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (defun w3-speak-use-voice-locking (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 "Tells w3 to start using voice locking.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 This is done by setting the w3 variables so that anchors etc are not marked by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 delimiters. We then turn on voice-lock-mode.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 Interactive prefix arg does the opposite. "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (interactive "P")
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 16
diff changeset
171 (declare (special w3-echo-link))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (setq w3-echo-link 'text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (if arg
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents: 16
diff changeset
174 (remove-hook 'w3-mode-hook 'w3-speak-mode-hook)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (add-hook 'w3-mode-hook 'w3-speak-mode-hook)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
177 (defun w3-speak-browse-page ()
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
178 "Browse a WWW page"
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
179 (interactive)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
180 (emacspeak-audio-annotate-paragraphs)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
181 (emacspeak-execute-repeatedly 'forward-paragraph))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
182
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
183 (declaim (special w3-mode-map))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
184 (define-key w3-mode-map "." 'w3-speak-browse-page)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
185
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
186 (defvar url-speak-last-progress-indication 0
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
187 "Caches when we last produced a progress auditory icon")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
188
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
189 (defadvice url-lazy-message (around emacspeak pre act)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
190 "Provide pleasant auditory feedback about progress"
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
191 (declare (special url-speak-last-progress-indication ))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
192 (let ((now (nth 1 (current-time))))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
193 (when (> now
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
194 (+ 3 url-speak-last-progress-indication))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
195 (setq url-speak-last-progress-indication now)
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
196 (emacspeak-auditory-icon 'progress))))
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 2
diff changeset
197
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (provide 'w3-speak)