]> git.eshelyaron.com Git - emacs.git/commitdiff
Groff \# comments.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Thu, 28 Jun 2007 07:14:47 +0000 (07:14 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Thu, 28 Jun 2007 07:14:47 +0000 (07:14 +0000)
(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 \#.

lisp/ChangeLog
lisp/textmodes/nroff-mode.el

index e7b0dee39e12e50390b85fdc7e822de263b1a95a..a8d83c208b998977548390184b686b8640ee4249 100644 (file)
@@ -1,3 +1,11 @@
+2007-06-28  Kevin Ryde  <user42@zip.com.au>
+
+       * textmodes/nroff-mode.el: 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 \#.
+
 2007-06-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc-bzr.el (vc-functions): Clear up the cache when reloading the file.
index ad0485fbb30153013d036f4b07e775b442f8020f..086f5156f2822a7b41280d6dd43447c1b0ac241d 100644 (file)
@@ -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))