changeset 30563:a8130a547f56

(ispell): New function, replacing an alias. Spell-check active region if in transient-mark-mode and mark is active; otherwise spell-check buffer.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 02 Aug 2000 20:21:53 +0000
parents 0551caab4401
children a363ab77020c
files lisp/textmodes/ispell.el
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el	Wed Aug 02 20:21:24 2000 +0000
+++ b/lisp/textmodes/ispell.el	Wed Aug 02 20:21:53 2000 +0000
@@ -206,7 +206,6 @@
 
 (and (not version18p)
      (not (boundp 'epoch::version))
-     (defalias 'ispell 'ispell-buffer)
      (defalias 'ispell-check-version 'check-ispell-version))
 
 
@@ -2806,6 +2805,17 @@
   (ispell-complete-word t))
 
 
+;;;###autoload
+(defun ispell ()
+  "Interactively check a region or buffer for spelling errors.
+If `transient-mark-mode' is on, an a region is active, spell-check
+that region.  Otherwise spell-check the buffer."
+  (interactive)
+  (if (and transient-mark-mode mark-active)
+      (ispell-region (region-beginning) (region-end))
+    (ispell-buffer)))
+
+
 ;;; **********************************************************************
 ;;; 			Ispell Minor Mode
 ;;; **********************************************************************