Some fixes to follow coding conventions in files maintained by FSF.
[bpt/emacs.git] / lisp / textmodes / spell.el
index 85adb6b..1923c86 100644 (file)
@@ -1,12 +1,15 @@
-;;; spell.el --- spelling correction interface for Emacs.
+;;; spell.el --- spelling correction interface for Emacs
 
 ;; Copyright (C) 1985 Free Software Foundation, Inc.
 
+;; Maintainer: FSF
+;; Keywords: wp, unix
+
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This mode provides an Emacs interface to the UNIX spell(1) program.
+;; Entry points are `spell-buffer', `spell-word', `spell-region' and
+;; `spell-string'.
+
+;; See also ispell.el for an interface to the ispell program.
 
+;;; Code:
 
-(defvar spell-command "spell"
-  "*Command to run the spell program.")
+(defgroup spell nil
+  "Interface to the UNIX spell(1) program."
+  :prefix "spell-"
+  :group 'applications)
 
-(defvar spell-filter nil
+(defcustom spell-command "spell"
+  "*Command to run the spell program."
+  :type 'string
+  :group 'spell)
+
+(defcustom spell-filter nil
   "*Filter function to process text before passing it to spell program.
 This function might remove text-processor commands.
-nil means don't alter the text before checking it.")
+nil means don't alter the text before checking it."
+  :type '(choice (const nil) function)
+  :group 'spell)
+
+;;;###autoload
+(put 'spell-filter 'risky-local-variable t)
 
 ;;;###autoload
 (defun spell-buffer ()
@@ -41,7 +66,7 @@ as its \"correct\" spelling; then the query replace is skipped."
 (defun spell-word ()
   "Check spelling of word at or before point.
 If it is not correct, ask user for the correct spelling
-and query-replace the entire buffer to substitute it."
+and `query-replace' the entire buffer to substitute it."
   (interactive)
   (let (beg end spell-filter)
     (save-excursion
@@ -54,7 +79,7 @@ and query-replace the entire buffer to substitute it."
 
 ;;;###autoload
 (defun spell-region (start end &optional description)
-  "Like spell-buffer but applies only to region.
+  "Like `spell-buffer' but applies only to region.
 Used in a program, applies from START to END.
 DESCRIPTION is an optional string naming the unit being checked:
 for example, \"word\"."
@@ -136,4 +161,6 @@ for example, \"word\"."
         (replace-match " "))
        (message "%sincorrect" (buffer-substring 1 (point-max)))))))
 
+(provide 'spell)
+
 ;;; spell.el ends here