PageRenderTime 53ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 1ms

/emacspeak-29.0/lisp/emacspeak-supercite.el

#
Emacs Lisp | 114 lines | 46 code | 17 blank | 51 comment | 0 complexity | 2155134385158afc9ea2e68558d69ce2 MD5 | raw file
Possible License(s): MIT
  1. ;;; emacspeak-supercite.el --- Speech enable supercite
  2. ;;; $Id: emacspeak-supercite.el 5798 2008-08-22 17:35:01Z tv.raman.tv $
  3. ;;; $Author: tv.raman.tv $
  4. ;;; Description: Emacspeak extension to speech enable supercite
  5. ;;; Keywords: Emacspeak, supercite, mail
  6. ;;{{{ LCD Archive entry:
  7. ;;; LCD Archive Entry:
  8. ;;; emacspeak| T. V. Raman |raman@cs.cornell.edu
  9. ;;; A speech interface to Emacs |
  10. ;;; $Date: 2007-08-25 18:28:19 -0700 (Sat, 25 Aug 2007) $ |
  11. ;;; $Revision: 4532 $ |
  12. ;;; Location undetermined
  13. ;;;
  14. ;;}}}
  15. ;;{{{ Copyright:
  16. ;;;Copyright (C) 1995 -- 2007, T. V. Raman
  17. ;;; Copyright (c) 1994, 1995 by Digital Equipment Corporation.
  18. ;;; All Rights Reserved.
  19. ;;;
  20. ;;; This file is not part of GNU Emacs, but the same permissions apply.
  21. ;;;
  22. ;;; GNU Emacs is free software; you can redistribute it and/or modify
  23. ;;; it under the terms of the GNU General Public License as published by
  24. ;;; the Free Software Foundation; either version 2, or (at your option)
  25. ;;; any later version.
  26. ;;;
  27. ;;; GNU Emacs is distributed in the hope that it will be useful,
  28. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. ;;; GNU General Public License for more details.
  31. ;;;
  32. ;;; You should have received a copy of the GNU General Public License
  33. ;;; along with GNU Emacs; see the file COPYING. If not, write to
  34. ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  35. ;;}}}
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37. ;;{{{ Introduction:
  38. ;;; Commentary:
  39. ;;; Speech-enable supercite.
  40. ;;; Code:
  41. ;;}}}
  42. ;;{{{ requires
  43. (require 'emacspeak-preamble)
  44. ;;}}}
  45. ;;{{{ Advice
  46. (defadvice sc-cite-region (after emacspeak pre act comp)
  47. "Provide auditory feedback"
  48. (when (interactive-p)
  49. (emacspeak-auditory-icon 'mark-object)
  50. (message "Cited region containing %s lines"
  51. (count-lines (ad-get-arg 0)
  52. (ad-get-arg 1)))))
  53. (defadvice sc-recite-region (after emacspeak pre act comp)
  54. "Provide auditory feedback"
  55. (when (interactive-p)
  56. (emacspeak-auditory-icon 'mark-object)
  57. (message "Re-cited region containing %s lines"
  58. (count-lines (ad-get-arg 0)
  59. (ad-get-arg 1)))))
  60. (defadvice sc-uncite-region (after emacspeak pre act comp)
  61. "Provide auditory feedback"
  62. (when (interactive-p)
  63. (emacspeak-auditory-icon 'mark-object)
  64. (message "Uncited region containing %s lines"
  65. (count-lines (ad-get-arg 0)
  66. (ad-get-arg 1)))))
  67. (defadvice sc-insert-reference (around emacspeak pre act
  68. comp)
  69. "Speak what we inserted"
  70. (cond
  71. ((interactive-p)
  72. (let ((opoint (point)))
  73. ad-do-it
  74. (emacspeak-speak-region opoint (point))
  75. (emacspeak-auditory-icon 'yank-object)))
  76. (t ad-do-it))
  77. ad-return-value)
  78. (defadvice sc-insert-citation (after emacspeak pre act
  79. comp)
  80. "Speak what we inserted"
  81. (when (interactive-p)
  82. (emacspeak-speak-line)
  83. (emacspeak-auditory-icon 'yank-object)))
  84. (defadvice sc-open-line (after emacspeak pre act comp)
  85. "Provide auditory feedback"
  86. (when (interactive-p)
  87. (emacspeak-auditory-icon 'open-object)
  88. (dtk-speak "Opened a blank line")))
  89. ;;}}}
  90. (provide 'emacspeak-supercite)
  91. ;;{{{ end of file
  92. ;;; local variables:
  93. ;;; folded-file: t
  94. ;;; byte-compile-dynamic: t
  95. ;;; end:
  96. ;;}}}