diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2007-06-28 07:14:47 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2007-06-28 07:14:47 +0000 |
commit | cd7c4fc57adaf718dc4aaea0069c4d55b9b5e71b (patch) | |
tree | b99b3d124b18f7ff23741e57873085aa3cdf7989 /lisp/textmodes/nroff-mode.el | |
parent | 360cf7bc8899964e8699550eb3d755909f4af606 (diff) | |
download | emacs-cd7c4fc57adaf718dc4aaea0069c4d55b9b5e71b.tar.gz |
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/nroff-mode.el')
-rw-r--r-- | lisp/textmodes/nroff-mode.el | 6 |
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 @@ ;; ' used otherwise). (modify-syntax-entry ?\" "\" 2" st) ;; Comments are delimited by \" and newline. + ;; And in groff also \# to newline. + (modify-syntax-entry ?# ". 2" st) (modify-syntax-entry ?\\ "\\ 1" st) (modify-syntax-entry ?\n ">" st) st) @@ -92,7 +94,7 @@ (mapconcat 'identity '("[f*n]*\\[.+?]" ; some groff extensions "(.." ; two chars after ( - "[^(\"]" ; single char escape + "[^(\"#]" ; single char escape ) "\\|") "\\)") ) @@ -127,7 +129,7 @@ closing requests for requests that are used in matched pairs." (concat "[.']\\|" paragraph-separate)) ;; comment syntax added by mit-erl!gildea 18 Apr 86 (set (make-local-variable 'comment-start) "\\\" ") - (set (make-local-variable 'comment-start-skip) "\\\\\"[ \t]*") + (set (make-local-variable 'comment-start-skip) "\\\\[\"#][ \t]*") (set (make-local-variable 'comment-column) 24) (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent) (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression)) |