aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-22 21:59:21 +0000
committerRichard M. Stallman1997-08-22 21:59:21 +0000
commite45502331b9c4073da3cc77418676798d32c59fe (patch)
tree41307075a970eba422020dc78c68cccdc857dd23
parent2790bdd8c8d0d4db4e112ff883b4e80c6b53b321 (diff)
downloademacs-e45502331b9c4073da3cc77418676798d32c59fe.tar.gz
emacs-e45502331b9c4073da3cc77418676798d32c59fe.zip
Customized.
-rw-r--r--lisp/textmodes/nroff-mode.el17
-rw-r--r--lisp/textmodes/paragraphs.el54
2 files changed, 49 insertions, 22 deletions
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 0e9182ada07..a44f797098e 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -35,12 +35,19 @@
35 35
36;;; Code: 36;;; Code:
37 37
38(defgroup nroff nil
39 "Nroff mode."
40 :group 'editing
41 :prefix "nroff-")
42
38(defvar nroff-mode-abbrev-table nil 43(defvar nroff-mode-abbrev-table nil
39 "Abbrev table used while in nroff mode.") 44 "Abbrev table used while in nroff mode.")
40(define-abbrev-table 'nroff-mode-abbrev-table ()) 45(define-abbrev-table 'nroff-mode-abbrev-table ())
41 46
42(defvar nroff-electric-mode nil 47(defcustom nroff-electric-mode nil
43 "*Non-nil means automatically closing requests when you insert an open.") 48 "*Non-nil means automatically closing requests when you insert an open."
49 :group 'nroff
50 :type 'boolean)
44 51
45(defvar nroff-mode-map nil 52(defvar nroff-mode-map nil
46 "Major mode keymap for nroff mode.") 53 "Major mode keymap for nroff mode.")
@@ -57,7 +64,7 @@
57(defvar nroff-mode-syntax-table nil 64(defvar nroff-mode-syntax-table nil
58 "Syntax table used while in nroff mode.") 65 "Syntax table used while in nroff mode.")
59 66
60(defvar nroff-font-lock-keywords 67(defcustom nroff-font-lock-keywords
61 (list 68 (list
62 ;; Directives are . or ' at start of line, followed by 69 ;; Directives are . or ' at start of line, followed by
63 ;; optional whitespace, then command (which my be longer than 70 ;; optional whitespace, then command (which my be longer than
@@ -78,7 +85,9 @@
78 ) "\\|") 85 ) "\\|")
79 "\\)") 86 "\\)")
80 ) 87 )
81 "Font-lock highlighting control in nroff-mode.") 88 "Font-lock highlighting control in nroff-mode."
89 :group 'nroff
90 :type '(repeat regexp))
82 91
83;;;###autoload 92;;;###autoload
84(defun nroff-mode () 93(defun nroff-mode ()
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 6a22338ef7d..ffb03724781 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -1,6 +1,7 @@
1;;; paragraphs.el --- paragraph and sentence parsing. 1;;; paragraphs.el --- paragraph and sentence parsing.
2 2
3;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997
4;; Free Software Foundation, Inc.
4 5
5;; Maintainer: FSF 6;; Maintainer: FSF
6;; Keywords: wp 7;; Keywords: wp
@@ -29,9 +30,16 @@
29 30
30;;; Code: 31;;; Code:
31 32
32(defvar use-hard-newlines nil 33(defgroup paragraphs nil
34 "Paragraph and sentence parsing."
35 :group 'editing)
36
37(defcustom use-hard-newlines nil
33 "Non-nil means to distinguish hard and soft newlines. 38 "Non-nil means to distinguish hard and soft newlines.
34See documentation for the `use-hard-newlines' function.") 39See documentation for the `use-hard-newlines' function."
40 :set '(lambda (symbol value) (use-hard-newlines (or value 0)))
41 :group 'paragraphs
42 :type 'boolean)
35(make-variable-buffer-local 'use-hard-newlines) 43(make-variable-buffer-local 'use-hard-newlines)
36 44
37(defun use-hard-newlines (&optional arg insert) 45(defun use-hard-newlines (&optional arg insert)
@@ -85,7 +93,7 @@ to paragraphs. The fill functions insert and delete only soft newlines."
85 (point) (1+ (point)))))))))))) 93 (point) (1+ (point))))))))))))
86 (setq use-hard-newlines t))) 94 (setq use-hard-newlines t)))
87 95
88(defvar paragraph-start "[ \t\n\f]" "\ 96(defcustom paragraph-start "[ \t\n\f]" "\
89*Regexp for beginning of a line that starts OR separates paragraphs. 97*Regexp for beginning of a line that starts OR separates paragraphs.
90This regexp should match lines that separate paragraphs 98This regexp should match lines that separate paragraphs
91and should also match lines that start a paragraph 99and should also match lines that start a paragraph
@@ -100,7 +108,9 @@ The variable `paragraph-separate' specifies how to distinguish
100lines that start paragraphs from lines that separate them. 108lines that start paragraphs from lines that separate them.
101 109
102If the variable `use-hard-newlines' is nonnil, then only lines following a 110If the variable `use-hard-newlines' is nonnil, then only lines following a
103hard newline are considered to match.") 111hard newline are considered to match."
112 :group 'paragraphs
113 :type 'regexp)
104 114
105;; paragraph-start requires a hard newline, but paragraph-separate does not: 115;; paragraph-start requires a hard newline, but paragraph-separate does not:
106;; It is assumed that paragraph-separate is distinctive enough to be believed 116;; It is assumed that paragraph-separate is distinctive enough to be believed
@@ -108,29 +118,37 @@ hard newline are considered to match.")
108;; something very minimal, even including "." (which makes every hard newline 118;; something very minimal, even including "." (which makes every hard newline
109;; start a new paragraph). 119;; start a new paragraph).
110 120
111(defvar paragraph-separate "[ \t\f]*$" "\ 121(defcustom paragraph-separate "[ \t\f]*$"
112*Regexp for beginning of a line that separates paragraphs. 122 "*Regexp for beginning of a line that separates paragraphs.
113If you change this, you may have to change paragraph-start also. 123If you change this, you may have to change paragraph-start also.
114 124
115This is matched against the text at the left margin, which is not necessarily 125This is matched against the text at the left margin, which is not necessarily
116the beginning of the line, so it should not use \"^\" as an anchor. This 126the beginning of the line, so it should not use \"^\" as an anchor. This
117ensures that the paragraph functions will work equally within a region of 127ensures that the paragraph functions will work equally within a region of
118text indented by a margin setting.") 128text indented by a margin setting."
129 :group 'paragraphs
130 :type 'regexp)
119 131
120(defvar sentence-end (purecopy "[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") "\ 132(defcustom sentence-end (purecopy "[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*")
121*Regexp describing the end of a sentence. 133 "*Regexp describing the end of a sentence.
122All paragraph boundaries also end sentences, regardless. 134All paragraph boundaries also end sentences, regardless.
123 135
124In order to be recognized as the end of a sentence, the ending period, 136In order to be recognized as the end of a sentence, the ending period,
125question mark, or exclamation point must be followed by two spaces, 137question mark, or exclamation point must be followed by two spaces,
126unless it's inside some sort of quotes or parenthesis.") 138unless it's inside some sort of quotes or parenthesis."
127 139 :group 'paragraphs
128(defvar page-delimiter "^\014" "\ 140 :type 'regexp)
129*Regexp describing line-beginnings that separate pages.") 141
130 142(defcustom page-delimiter "^\014"
131(defvar paragraph-ignore-fill-prefix nil "\ 143 "*Regexp describing line-beginnings that separate pages."
132Non-nil means the paragraph commands are not affected by `fill-prefix'. 144 :group 'paragraphs
133This is desirable in modes where blank lines are the paragraph delimiters.") 145 :type 'regexp)
146
147(defcustom paragraph-ignore-fill-prefix nil
148 "*Non-nil means the paragraph commands are not affected by `fill-prefix'.
149This is desirable in modes where blank lines are the paragraph delimiters."
150 :group 'paragraphs
151 :type 'boolean)
134 152
135(defun forward-paragraph (&optional arg) 153(defun forward-paragraph (&optional arg)
136 "Move forward to end of paragraph. 154 "Move forward to end of paragraph.