]> git.eshelyaron.com Git - emacs.git/commitdiff
* files.el (set-auto-mode-1): Check second line for -*- if file
authorWerner LEMBERG <wl@gnu.org>
Fri, 16 Nov 2007 08:03:45 +0000 (08:03 +0000)
committerWerner LEMBERG <wl@gnu.org>
Fri, 16 Nov 2007 08:03:45 +0000 (08:03 +0000)
starts with '\" (which is used by man pages to identify needed
troff preprocessors).

lisp/ChangeLog
lisp/files.el

index 0c34a9f6090af7dd4afd93ce8e58dcef2e098b14..e8fbe7eec5c47cbf2ce926c0f017554221211817 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-16  Werner Lemberg  <wl@gnu.org>
+
+       * files.el (set-auto-mode-1): Check second line for -*- if file
+       starts with '\" (which is used by man pages to identify needed
+       troff preprocessors).
+
 2007-11-16  Glenn Morris  <rgm@gnu.org>
 
        * mail/mail-extr.el (mail-extr-all-top-level-domains): Update domains.
index a7dd79b8a88be88a12222658379d767f9818c789..d8c78a320ec3aa89be8b505ab6bbfc9a03f40a47 100644 (file)
@@ -2428,7 +2428,11 @@ Otherwise, return nil; point may be changed."
                             ;; put them in the first line of
                             ;; such a file without screwing up
                             ;; the interpreter invocation.
-                            (and (looking-at "^#!") 2)) t)
+                            ;; The same holds for
+                            ;;   '\"
+                            ;; in man pages (preprocessor
+                            ;; magic for the `man' program).
+                            (and (looking-at "^\\(#!\\|'\\\\\"\\)") 2)) t)
      (progn
        (skip-chars-forward " \t")
        (setq beg (point))