From: Gerd Moellmann Date: Wed, 2 Aug 2000 20:21:53 +0000 (+0000) Subject: (ispell): New function, replacing an alias. X-Git-Tag: emacs-pretest-21.0.90~2518 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=754bd273b799ccc998fab2a9c86f96d7e3b5fd30;p=emacs.git (ispell): New function, replacing an alias. Spell-check active region if in transient-mark-mode and mark is active; otherwise spell-check buffer. --- diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index b82a2195601..ae2900f4f9a 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -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 @@ Standard ispell choices are then available." (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 ;;; **********************************************************************