emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file variables and man pages with preprocessors


From: Werner LEMBERG
Subject: Re: file variables and man pages with preprocessors
Date: Mon, 12 Nov 2007 12:20:43 +0100 (CET)

> > If someone shows me where this should be handled, I'll fix it by
> > myself and apply the changes to the CVS.  I wasn't able to find
> > the location in the sources where the shebang is handled
> > w.r.t. recognizing the encoding tag.
> 
> set-auto-mode-1 in files.el

Thanks.  Here's what I'm planning to commit:


--- files.el.old        2007-11-11 14:20:14.000000000 +0100
+++ files.el    2007-11-12 12:19:03.000000000 +0100
@@ -2428,7 +2428,12 @@
                             ;; 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 (or (looking-at "^#!")
+                                     (looking-at "^'\\\\\"")) 2)) t)
      (progn
        (skip-chars-forward " \t")
        (setq beg (point))


> If the #! special case is documented in the manuals, the \" one
> probably should be too.

Yes, will do.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]