unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* nroff-mode groff \# comments (patch)
@ 2007-05-23 23:37 Kevin Ryde
  2007-05-24 10:55 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2007-05-23 23:37 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

In groff \# introduces a comment, through to newline, like the normal
troff \" but eating the newline as well, or something like that.  You
can lots for instance in om.tmac (/usr/share/groff/1.18.1/tmac/om.tmac)
which comes with groff.  (Remember to M-x nroff-mode.)

2007-05-24  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 \#.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nroff-mode.el.groff.diff --]
[-- Type: text/x-diff, Size: 1817 bytes --]

*** nroff-mode.el	12 Mar 2007 10:16:24 +1100	1.32
--- nroff-mode.el	24 May 2007 09:33:22 +1000	
***************
*** 66,71 ****
--- 66,73 ----
      ;; ' 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,98 ****
  	 (mapconcat 'identity
  		    '("[f*n]*\\[.+?]" ; some groff extensions
  		      "(.."	      ; two chars after (
! 		      "[^(\"]"	      ; single char escape
  		      ) "\\|")
  	 "\\)")
     )
--- 94,100 ----
  	 (mapconcat 'identity
  		    '("[f*n]*\\[.+?]" ; some groff extensions
  		      "(.."	      ; two chars after (
! 		      "[^(\"#]"	      ; single char escape
  		      ) "\\|")
  	 "\\)")
     )
***************
*** 127,133 ****
         (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-column) 24)
    (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent)
    (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression))
--- 129,135 ----
         (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-column) 24)
    (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent)
    (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nroff-mode groff \# comments (patch)
  2007-05-23 23:37 nroff-mode groff \# comments (patch) Kevin Ryde
@ 2007-05-24 10:55 ` Richard Stallman
  2007-06-28  1:15   ` Kevin Ryde
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-05-24 10:55 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: emacs-devel

Would someone please install this?  (Kevin, if no one installs it in a
week, would you please send a reminder?)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nroff-mode groff \# comments (patch)
  2007-05-24 10:55 ` Richard Stallman
@ 2007-06-28  1:15   ` Kevin Ryde
  2007-06-28  7:15     ` Thien-Thi Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2007-06-28  1:15 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

Richard Stallman <rms@gnu.org> writes:
>
> Would someone please install this?  (Kevin, if no one installs it in a
> week, would you please send a reminder?)

This didn't get installed, or not in the head.

2007-05-24  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 \#.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nroff-mode.el.groff.diff --]
[-- Type: text/x-diff, Size: 1817 bytes --]

*** nroff-mode.el	12 Mar 2007 10:16:24 +1100	1.32
--- nroff-mode.el	24 May 2007 09:33:22 +1000	
***************
*** 66,71 ****
--- 66,73 ----
      ;; ' 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,98 ****
  	 (mapconcat 'identity
  		    '("[f*n]*\\[.+?]" ; some groff extensions
  		      "(.."	      ; two chars after (
! 		      "[^(\"]"	      ; single char escape
  		      ) "\\|")
  	 "\\)")
     )
--- 94,100 ----
  	 (mapconcat 'identity
  		    '("[f*n]*\\[.+?]" ; some groff extensions
  		      "(.."	      ; two chars after (
! 		      "[^(\"#]"	      ; single char escape
  		      ) "\\|")
  	 "\\)")
     )
***************
*** 127,133 ****
         (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-column) 24)
    (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent)
    (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression))
--- 129,135 ----
         (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-column) 24)
    (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent)
    (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nroff-mode groff \# comments (patch)
  2007-06-28  1:15   ` Kevin Ryde
@ 2007-06-28  7:15     ` Thien-Thi Nguyen
  0 siblings, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2007-06-28  7:15 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: emacs-devel

() Kevin Ryde <user42@zip.com.au>
() Thu, 28 Jun 2007 11:15:11 +1000

   This didn't get installed, or not in the head.

it's now installed on the trunk.

thi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-28  7:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 23:37 nroff-mode groff \# comments (patch) Kevin Ryde
2007-05-24 10:55 ` Richard Stallman
2007-06-28  1:15   ` Kevin Ryde
2007-06-28  7:15     ` Thien-Thi Nguyen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).