From: Chong Yidong Date: Wed, 20 Aug 2008 22:23:06 +0000 (+0000) Subject: (nroff-mode): Avoid auto-filling on directive lines. X-Git-Tag: emacs-pretest-23.0.90~3398 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a22be623d57e070f9ac671b15e478d6cd69d5708;p=emacs.git (nroff-mode): Avoid auto-filling on directive lines. --- diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 81979fb0c35..8a068fe2a48 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -144,6 +144,14 @@ closing requests for requests that are used in matched pairs." (concat "[.']\\|" paragraph-start)) (set (make-local-variable 'paragraph-separate) (concat "[.']\\|" paragraph-separate)) + ;; Don't auto-fill directive lines starting . or ' since they normally + ;; have to be one line. But do auto-fill comments .\" .\# and '''. + ;; Comment directives (those starting . or ') are [.'][ \t]*\\[#"] + ;; or ''', and this regexp is everything except those. So [.'] + ;; followed by not backslash and not ' or followed by 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]*")