Commit | Line | Data |
---|---|---|
9755a92f C |
1 | |
2 | (defvar scribe-mode-syntax-table nil "\ | |
3 | Syntax table used while in scribe mode.") | |
4 | ||
5 | (defvar scribe-mode-abbrev-table nil "\ | |
6 | Abbrev table used while in scribe mode.") | |
7 | ||
8 | (defvar scribe-fancy-paragraphs nil "\ | |
9 | *Non-NIL makes Scribe mode use a different style of paragraph separation.") | |
10 | ||
11 | (defvar scribe-electric-quote nil "\ | |
12 | *Non-NIL makes insert of double quote use `` or '' depending on context.") | |
13 | ||
14 | (defvar scribe-electric-parenthesis nil "\ | |
15 | *Non-NIL makes parenthesis char ( (]}> ) automatically insert its close | |
16 | if typed after an @Command form.") | |
17 | ||
18 | (defconst scribe-open-parentheses "[({<" "\ | |
19 | Open parenthesis characters for Scribe.") | |
20 | ||
21 | (defconst scribe-close-parentheses "])}>" "\ | |
22 | Close parenthesis characters for Scribe. These should match up with | |
23 | scribe-open-parenthesis.") | |
24 | ||
25 | (if (null scribe-mode-syntax-table) (let ((st (syntax-table))) (unwind-protect (progn (setq scribe-mode-syntax-table (copy-syntax-table text-mode-syntax-table)) (set-syntax-table scribe-mode-syntax-table) (modify-syntax-entry 34 " ") (modify-syntax-entry 92 " ") (modify-syntax-entry 64 "w ") (modify-syntax-entry 60 "(> ") (modify-syntax-entry 62 ")< ") (modify-syntax-entry 91 "(] ") (modify-syntax-entry 93 ")[ ") (modify-syntax-entry 123 "(} ") (modify-syntax-entry 125 "){ ") (modify-syntax-entry 39 "w ")) (set-syntax-table st)))) | |
26 | ||
27 | (defvar scribe-mode-map nil) | |
28 | ||
29 | (if scribe-mode-map nil (setq scribe-mode-map (make-sparse-keymap)) (define-key scribe-mode-map " " (quote scribe-tab)) (define-key scribe-mode-map "\e " (quote tab-to-tab-stop)) (define-key scribe-mode-map "\es" (quote center-line)) (define-key scribe-mode-map "\e}" (quote up-list)) (define-key scribe-mode-map "\eS" (quote center-paragraph)) (define-key scribe-mode-map "\"" (quote scribe-insert-quote)) (define-key scribe-mode-map "(" (quote scribe-parenthesis)) (define-key scribe-mode-map "[" (quote scribe-parenthesis)) (define-key scribe-mode-map "{" (quote scribe-parenthesis)) (define-key scribe-mode-map "<" (quote scribe-parenthesis)) (define-key scribe-mode-map "\ 3c" (quote scribe-chapter)) (define-key scribe-mode-map "\ 3S" (quote scribe-section)) (define-key scribe-mode-map "\ 3s" (quote scribe-subsection)) (define-key scribe-mode-map "\ 3e" (quote scribe-insert-environment)) (define-key scribe-mode-map "\ 3\ 5" (quote scribe-bracket-region-be)) (define-key scribe-mode-map "\ 3[" (quote scribe-begin)) (define-key scribe-mode-map "\ 3]" (quote scribe-end)) (define-key scribe-mode-map "\ 3i" (quote scribe-italicize-word)) (define-key scribe-mode-map "\ 3b" (quote scribe-bold-word)) (define-key scribe-mode-map "\ 3u" (quote scribe-underline-word))) | |
30 | ||
31 | (defun scribe-mode nil "\ | |
32 | Major mode for editing files of Scribe (a text formatter) source. | |
33 | Scribe-mode is similar text-mode, with a few extra commands added. | |
34 | \\{scribe-mode-map} | |
35 | ||
36 | Interesting variables: | |
37 | ||
38 | scribe-fancy-paragraphs | |
39 | Non-nil makes Scribe mode use a different style of paragraph separation. | |
40 | ||
41 | scribe-electric-quote | |
42 | Non-nil makes insert of double quote use `` or '' depending on context. | |
43 | ||
44 | scribe-electric-parenthesis | |
45 | Non-nil makes an open-parenthesis char (one of `([<{') | |
46 | Content-type: text/html