]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/scribe.el
Some fixes to follow coding conventions in files maintained by FSF.
[gnu-emacs] / lisp / textmodes / scribe.el
index 25815121002f68d29947287da811e623ae2e821b..d1b5aedf3c6887cd0237427ab7a67b6423a78891 100644 (file)
@@ -1,4 +1,4 @@
-;;; scribe.el --- scribe mode, and its idiosyncratic commands.
+;;; scribe.el --- scribe mode, and its idiosyncratic commands
 
 ;; Copyright (C) 1985 Free Software Foundation, Inc.
 
@@ -18,8 +18,9 @@
 ;; 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:
 
 
 ;;; Code:
 
+(defgroup scribe nil
+  "Scribe mode."
+  :prefix "scribe-"
+  :group 'wp)
+
 (defvar scribe-mode-syntax-table nil
   "Syntax table used while in scribe mode.")
 
 (defvar scribe-mode-abbrev-table nil
   "Abbrev table used while in scribe mode.")
 
-(defvar scribe-fancy-paragraphs nil
-  "*Non-NIL makes Scribe mode use a different style of paragraph separation.")
+(defcustom scribe-fancy-paragraphs nil
+  "*Non-NIL makes Scribe mode use a different style of paragraph separation."
+  :type 'boolean
+  :group 'scribe)
 
-(defvar scribe-electric-quote nil
-  "*Non-NIL makes insert of double quote use `` or '' depending on context.")
+(defcustom scribe-electric-quote nil
+  "*Non-NIL makes insert of double quote use `` or '' depending on context."
+  :type 'boolean
+  :group 'scribe)
 
-(defvar scribe-electric-parenthesis nil
+(defcustom scribe-electric-parenthesis nil
   "*Non-NIL makes parenthesis char ( (]}> ) automatically insert its close
-if typed after an @Command form.")
+if typed after an @Command form."
+  :type 'boolean
+  :group 'scribe)
 
 (defconst scribe-open-parentheses "[({<"
   "Open parenthesis characters for Scribe.")
@@ -86,21 +98,21 @@ These should match up with `scribe-open-parenthesis'.")
   (define-key scribe-mode-map "[" 'scribe-parenthesis)
   (define-key scribe-mode-map "{" 'scribe-parenthesis)
   (define-key scribe-mode-map "<" 'scribe-parenthesis)
-  (define-key scribe-mode-map "\^cc" 'scribe-chapter)
-  (define-key scribe-mode-map "\^cS" 'scribe-section)
-  (define-key scribe-mode-map "\^cs" 'scribe-subsection)
-  (define-key scribe-mode-map "\^ce" 'scribe-insert-environment)
-  (define-key scribe-mode-map "\^c\^e" 'scribe-bracket-region-be)
-  (define-key scribe-mode-map "\^c[" 'scribe-begin)
-  (define-key scribe-mode-map "\^c]" 'scribe-end)
-  (define-key scribe-mode-map "\^ci" 'scribe-italicize-word)
-  (define-key scribe-mode-map "\^cb" 'scribe-bold-word)
-  (define-key scribe-mode-map "\^cu" 'scribe-underline-word))
+  (define-key scribe-mode-map "\C-c\C-c" 'scribe-chapter)
+  (define-key scribe-mode-map "\C-c\C-t" 'scribe-section)
+  (define-key scribe-mode-map "\C-c\C-s" 'scribe-subsection)
+  (define-key scribe-mode-map "\C-c\C-v" 'scribe-insert-environment)
+  (define-key scribe-mode-map "\C-c\C-e" 'scribe-bracket-region-be)
+  (define-key scribe-mode-map "\C-c[" 'scribe-begin)
+  (define-key scribe-mode-map "\C-c]" 'scribe-end)
+  (define-key scribe-mode-map "\C-c\C-i" 'scribe-italicize-word)
+  (define-key scribe-mode-map "\C-c\C-b" 'scribe-bold-word)
+  (define-key scribe-mode-map "\C-c\C-u" 'scribe-underline-word))
 
 ;;;###autoload
 (defun scribe-mode ()
   "Major mode for editing files of Scribe (a text formatter) source.
-Scribe-mode is similar text-mode, with a few extra commands added.
+Scribe-mode is similar to text-mode, with a few extra commands added.
 \\{scribe-mode-map}
 
 Interesting variables:
@@ -130,14 +142,14 @@ scribe-electric-parenthesis
   (make-local-variable 'comment-end)
   (setq comment-end "]")
   (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat "\\(^[\n\f]\\)\\|\\(^@\\w+["
+  (setq paragraph-start (concat "\\([\n\f]\\)\\|\\(@\\w+["
                                 scribe-open-parentheses
                                "].*["
                                 scribe-close-parentheses
                                "]$\\)"))
   (make-local-variable 'paragraph-separate)
   (setq paragraph-separate (if scribe-fancy-paragraphs
-                              paragraph-start "^$"))
+                              paragraph-start "$"))
   (make-local-variable 'sentence-end)
   (setq sentence-end "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\|  \\)[ \t\n]*")
   (make-local-variable 'compile-command)
@@ -321,4 +333,6 @@ preceding text is of the form @Command."
          (save-excursion
            (insert (aref scribe-close-parentheses paren-char)))))))
 
+(provide 'scribe)
+
 ;;; scribe.el ends here