PageRenderTime 53ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/emacspeak-29.0/lisp/emacspeak-folding.el

#
Emacs Lisp | 100 lines | 32 code | 15 blank | 53 comment | 1 complexity | 34b9f24056cb1f4b3ead5df3bf452db3 MD5 | raw file
Possible License(s): MIT
  1. ;;; emacspeak-folding.el --- Speech enable Folding Mode -- enables structured editting
  2. ;;; $Id: emacspeak-folding.el 5798 2008-08-22 17:35:01Z tv.raman.tv $
  3. ;;; $Author: tv.raman.tv $
  4. ;;; DescriptionEmacspeak extensions for folding-mode
  5. ;;; Keywords:emacspeak, audio interface to emacs Folding editor
  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. ;;{{{ requires
  37. (require 'emacspeak-preamble)
  38. ;;}}}
  39. ;;{{{ Introduction:
  40. ;;; Folding mode turns emacs into a folding editor.
  41. ;;; Folding mode is what I use:
  42. ;;; emacs 19 comes with similar packages, e.g. allout.el
  43. ;;; This module defines some advice forms that make folding mode a pleasure to use.
  44. ;;; Think of a fold as a container.
  45. ;;;
  46. ;;}}}
  47. ;;{{{ Advice
  48. (defadvice fold-goto-line (after emacspeak pre act)
  49. "Speak the line. "
  50. (when (interactive-p)
  51. (emacspeak-speak-line )))
  52. (defadvice folding-mode (after emacspeak pre act )
  53. "Provide spoken feedback"
  54. (when (interactive-p)
  55. (message "turned %s folding mode"
  56. (if folding-mode " on " " off" ))))
  57. (defadvice fold-enter (after emacspeak pre act)
  58. "Produce an auditory icon and then speak the line. "
  59. (when (interactive-p)
  60. (emacspeak-auditory-icon 'open-object)
  61. (emacspeak-speak-line)))
  62. (defadvice fold-exit (after emacspeak pre act)
  63. "Produce an auditory icon.
  64. Then speak the folded line."
  65. (when (interactive-p)
  66. (emacspeak-auditory-icon'close-object)
  67. (emacspeak-speak-line)))
  68. (defadvice fold-fold-region (after emacspeak pre act)
  69. "Produce an auditory icon. "
  70. (when (interactive-p )
  71. (emacspeak-auditory-icon 'open-object)
  72. (message "Specify a meaningful name for the new fold ")))
  73. (defadvice fold-hide (after emacspeak pre act )
  74. "Provide auditory feedback"
  75. (when (interactive-p)
  76. (emacspeak-auditory-icon 'close-object)
  77. (message "Hid current fold")))
  78. ;;}}}
  79. (provide 'emacspeak-folding)
  80. ;;{{{ emacs local variables
  81. ;;; local variables:
  82. ;;; folded-file: t
  83. ;;; byte-compile-dynamic: t
  84. ;;; end:
  85. ;;}}}