]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/nroff-mode.el
Add 2010 to copyright years.
[gnu-emacs] / lisp / textmodes / nroff-mode.el
index 81979fb0c356c70414b41e5cb80141c82bf1bf9f..61ea89582b2a0d0e1b9e2b845dbce1da9ea75714 100644 (file)
@@ -1,7 +1,7 @@
 ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source
 
 ;; Copyright (C) 1985, 1986, 1994, 1995, 1997, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: wp
@@ -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]*")