From 754bd273b799ccc998fab2a9c86f96d7e3b5fd30 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 2 Aug 2000 20:21:53 +0000 Subject: [PATCH] (ispell): New function, replacing an alias. Spell-check active region if in transient-mark-mode and mark is active; otherwise spell-check buffer. --- lisp/textmodes/ispell.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ;;; ********************************************************************** -- 2.39.2