1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
;;; emacspeak-gnuplot.el --- speech-enable gnuplot mode
;;; $Id: emacspeak-gnuplot.el,v 24.0 2006/05/03 02:54:00 raman Exp $
;;; $Author: raman $
;;; Description: Emacspeak extension to speech-enable
;;; gnuplot mode
;;; Keywords: Emacspeak, WWW interaction
;;{{{ LCD Archive entry:
;;; LCD Archive Entry:
;;; emacspeak| T. V. Raman |raman@cs.cornell.edu
;;; A speech interface to Emacs |
;;; $Date: 2006/05/03 02:54:00 $ |
;;; $Revision: 24.0 $ |
;;; Location undetermined
;;;
;;}}}
;;{{{ Copyright:
;;; Copyright (C) 1995 -- 2004, T. V. Raman<raman@cs.cornell.edu>
;;; All Rights Reserved.
;;;
;;; This file is not part of GNU Emacs, but the same permissions apply.
;;;
;;; GNU Emacs is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;;
;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING. If not, write to
;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;}}}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;{{{ required modules
(require 'emacspeak-preamble)
;;}}}
;;{{{ Introduction:
;;; Commentary:
;;; This module speech-enables gnuplot-mode
;;; an Emacs add-on that enables fluent interaction with
;;; gnuplot.
;;; Use gnuplot to generate plots of mathematical functions
;;; for inclusion in documents.
;;; Code:
;;}}}
;;{{{ advice interactive commands
(defadvice gnuplot-send-region-to-gnuplot (after emacspeak
pre act
comp)
"Speak status."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-other-window 1)))
(defadvice gnuplot-send-line-to-gnuplot (after emacspeak
pre act
comp)
"Speak status."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-other-window 1)))
(defadvice gnuplot-send-line-and-forward (after emacspeak
pre act
comp)
"Speak status."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-other-window 1)))
(defadvice gnuplot-send-buffer-to-gnuplot (after emacspeak
pre act
comp)
"Speak status."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-other-window 1)))
(defadvice gnuplot-send-file-to-gnuplot (after emacspeak
pre act
comp)
"Speak status."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-other-window 1)))
(defadvice gnuplot-delchar-or-maybe-eof (around emacspeak pre act)
"Speak character you're deleting."
(cond
((interactive-p )
(cond
((= (point) (point-max))
(message "Sending EOF to comint process"))
(t (dtk-tone 500 30 'force)
(and emacspeak-delete-char-speak-deleted-char
(emacspeak-speak-char t))))
ad-do-it)
(t ad-do-it))
ad-return-value)
(defadvice gnuplot-kill-gnuplot-buffer (after emacspeak pre
act comp)
"Provide auditory feedback."
(when (interactive-p)
(emacspeak-auditory-icon 'close-object)
(emacspeak-speak-mode-line)))
(defadvice gnuplot-show-gnuplot-buffer (after emacspeak pre
act comp)
"Speak status."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-mode-line)))
(defadvice gnuplot-complete-keyword (around emacspeak pre act)
"Say what you completed."
(let ((prior (point ))
(dtk-stop-immediately dtk-stop-immediately))
(when dtk-stop-immediately (dtk-stop))
ad-do-it
(when (> (point) prior)
(setq dtk-stop-immediately nil)
(dtk-speak (buffer-substring prior (point ))))
ad-return-value))
(defadvice gnuplot-indent-line (after emacspeak pre act
comp)
"Speak line we idnented."
(when (interactive-p)
(emacspeak-auditory-icon 'large-movement)
(emacspeak-speak-line)))
(defadvice gnuplot-negate-option (after emacspeak pre act comp)
"Speak line we negated."
(when (interactive-p)
(emacspeak-auditory-icon 'select-object)
(emacspeak-speak-line)))
(add-hook 'gnuplot-mode-hook
(function
(lambda nil
(dtk-set-punctuations 'all)
(voice-lock-mode t))))
;;}}}
(provide 'emacspeak-gnuplot)
;;{{{ end of file
;;; local variables:
;;; folded-file: t
;;; byte-compile-dynamic: t
;;; end:
;;}}}
|