unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* nroff-mode don't auto-fill directives
@ 2007-10-12  0:58 Kevin Ryde
  2007-10-12 15:59 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Ryde @ 2007-10-12  0:58 UTC (permalink / raw)
  To: emacs-devel

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

This is my idea for not auto-filling nroff directive lines.  I struck it
on a long .URL line (a groff extension).  I think comment lines like .\"
should still auto-fill, as the do now, though they don't actually come
out quite right yet (neither before nor after this change).

2007-10-12  Kevin Ryde  <user42@zip.com.au>

	* textmodes/nroff-mode.el (nroff-mode): Set auto-fill-inhibit-regexp
	so as not to auto-fill on directive lines other than comment
	directives.


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

*** nroff-mode.el	14 Sep 2007 10:50:21 +1000	1.35
--- nroff-mode.el	12 Oct 2007 10:51:35 +1000	
***************
*** 127,132 ****
--- 127,141 ----
         (concat "[.']\\|" paragraph-start))
    (set (make-local-variable 'paragraph-separate)
         (concat "[.']\\|" paragraph-separate))
+ 
+   ;; Don't auto-fill directives, since they normally have to be one line,
+   ;; but do auto-fill comments .\" .\# and '''
+   ;; Comment directive pattern would be [.'][ \t]*[\\][#"], and this regexp
+   ;; is everything other than that, so not a backslash (and not a '' as in
+   ;; '''), or a backslash but then not # or "
+   (set (make-local-variable 'auto-fill-inhibit-regexp)
+        "[.'][ \t]*\\([^\\ \t']\\|\\\\[^#\"]\\)")
+ 
    ;; comment syntax added by mit-erl!gildea 18 Apr 86
    (set (make-local-variable 'comment-start) "\\\" ")
    (set (make-local-variable 'comment-start-skip) "\\\\[\"#][ \t]*")

[-- 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

end of thread, other threads:[~2007-10-13  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-12  0:58 nroff-mode don't auto-fill directives Kevin Ryde
2007-10-12 15:59 ` Richard Stallman
2007-10-12 21:52   ` Kevin Ryde
2007-10-13  6:41     ` Richard Stallman

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).