-;;; scribe.el --- scribe mode, and its idiosyncratic commands.
+;;; scribe.el --- scribe mode, and its idiosyncratic commands
;; Copyright (C) 1985 Free Software Foundation, Inc.
;; 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.")
(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:
(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)
(save-excursion
(insert (aref scribe-close-parentheses paren-char)))))))
+(provide 'scribe)
+
;;; scribe.el ends here