aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-06-28 07:14:47 +0000
committerThien-Thi Nguyen2007-06-28 07:14:47 +0000
commitcd7c4fc57adaf718dc4aaea0069c4d55b9b5e71b (patch)
treeb99b3d124b18f7ff23741e57873085aa3cdf7989 /lisp/textmodes
parent360cf7bc8899964e8699550eb3d755909f4af606 (diff)
downloademacs-cd7c4fc57adaf718dc4aaea0069c4d55b9b5e71b.tar.gz
emacs-cd7c4fc57adaf718dc4aaea0069c4d55b9b5e71b.zip
Groff \# comments.
(nroff-mode-syntax-table): \# comment intro, plain # as punct per global table. (nroff-font-lock-keywords): Add # as a single char escape. (nroff-mode): In comment-start-skip, match \#.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/nroff-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index ad0485fbb30..086f5156f28 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -66,6 +66,8 @@
66 ;; ' used otherwise). 66 ;; ' used otherwise).
67 (modify-syntax-entry ?\" "\" 2" st) 67 (modify-syntax-entry ?\" "\" 2" st)
68 ;; Comments are delimited by \" and newline. 68 ;; Comments are delimited by \" and newline.
69 ;; And in groff also \# to newline.
70 (modify-syntax-entry ?# ". 2" st)
69 (modify-syntax-entry ?\\ "\\ 1" st) 71 (modify-syntax-entry ?\\ "\\ 1" st)
70 (modify-syntax-entry ?\n ">" st) 72 (modify-syntax-entry ?\n ">" st)
71 st) 73 st)
@@ -92,7 +94,7 @@
92 (mapconcat 'identity 94 (mapconcat 'identity
93 '("[f*n]*\\[.+?]" ; some groff extensions 95 '("[f*n]*\\[.+?]" ; some groff extensions
94 "(.." ; two chars after ( 96 "(.." ; two chars after (
95 "[^(\"]" ; single char escape 97 "[^(\"#]" ; single char escape
96 ) "\\|") 98 ) "\\|")
97 "\\)") 99 "\\)")
98 ) 100 )
@@ -127,7 +129,7 @@ closing requests for requests that are used in matched pairs."
127 (concat "[.']\\|" paragraph-separate)) 129 (concat "[.']\\|" paragraph-separate))
128 ;; comment syntax added by mit-erl!gildea 18 Apr 86 130 ;; comment syntax added by mit-erl!gildea 18 Apr 86
129 (set (make-local-variable 'comment-start) "\\\" ") 131 (set (make-local-variable 'comment-start) "\\\" ")
130 (set (make-local-variable 'comment-start-skip) "\\\\\"[ \t]*") 132 (set (make-local-variable 'comment-start-skip) "\\\\[\"#][ \t]*")
131 (set (make-local-variable 'comment-column) 24) 133 (set (make-local-variable 'comment-column) 24)
132 (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent) 134 (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent)
133 (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression)) 135 (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression))