all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Ryde <user42@zip.com.au>
To: emacs-devel@gnu.org
Subject: nroff-mode don't auto-fill directives
Date: Fri, 12 Oct 2007 10:58:24 +1000	[thread overview]
Message-ID: <87wsttup1r.fsf@blah.blah> (raw)

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

             reply	other threads:[~2007-10-12  0:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12  0:58 Kevin Ryde [this message]
2007-10-12 15:59 ` nroff-mode don't auto-fill directives Richard Stallman
2007-10-12 21:52   ` Kevin Ryde
2007-10-13  6:41     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wsttup1r.fsf@blah.blah \
    --to=user42@zip.com.au \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.