changeset 81650:b6aa03e14a51

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 \#.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Thu, 28 Jun 2007 07:13:23 +0000
parents e40762570726
children 9f324e62578d
files lisp/textmodes/nroff-mode.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/nroff-mode.el	Thu Jun 28 02:01:54 2007 +0000
+++ b/lisp/textmodes/nroff-mode.el	Thu Jun 28 07:13:23 2007 +0000
@@ -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 @@
        (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))