summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorReiner Steib <Reiner.Steib@gmx.de>2006-05-30 18:37:15 +0000
committerReiner Steib <Reiner.Steib@gmx.de>2006-05-30 18:37:15 +0000
commit2809db3399d9807158abefef67677f51b825d361 (patch)
tree8be46388111a40da8e2a2aad777a1b4244aab087 /lisp
parentf4eb5e10576c10a6a6b80f0ed9bc49ed47f3bcc4 (diff)
downloademacs-2809db3399d9807158abefef67677f51b825d361.tar.gz
* textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): New
functions. * textmodes/text-mode.el (text-mode-hook): Use turn-on-flyspell.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/textmodes/flyspell.el12
-rw-r--r--lisp/textmodes/text-mode.el2
3 files changed, 20 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 675087bc16c..bd2821c2a3f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-30 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): New
+ functions.
+
+ * textmodes/text-mode.el (text-mode-hook): Use turn-on-flyspell.
+
2006-05-30 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el: (org-agenda-highlight-todo): Make sure regexp
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index c20ecef31e0..23f4756f4a7 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -486,6 +486,18 @@ in your .emacs file.
(flyspell-mode-on)
(flyspell-mode-off)))
+;;;###autoload
+(defun turn-on-flyspell ()
+ "Unconditionally turn on Flyspell mode."
+ (flyspell-mode 1))
+
+;;;###autoload
+(defun turn-off-flyspell ()
+ "Unconditionally turn off Flyspell mode."
+ (flyspell-mode -1))
+
+(custom-add-option 'text-mode-hook 'turn-on-flyspell)
+
;;*---------------------------------------------------------------------*/
;;* flyspell-buffers ... */
;;* ------------------------------------------------------------- */
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index a4b67057676..9263c48f18b 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -33,7 +33,7 @@
(defcustom text-mode-hook nil
"Normal hook run when entering Text mode and many related modes."
:type 'hook
- :options '(turn-on-auto-fill flyspell-mode)
+ :options '(turn-on-auto-fill turn-on-flyspell)
:group 'data)
(defvar text-mode-variant nil