diff lisp/prim/files.el @ 6:27bc7f280385 r19-15b4

Import from CVS: tag r19-15b4
author cvs
date Mon, 13 Aug 2007 08:47:15 +0200
parents b82b59fe008d
children 4b173ad71786
line wrap: on
line diff
--- a/lisp/prim/files.el	Mon Aug 13 08:46:57 2007 +0200
+++ b/lisp/prim/files.el	Mon Aug 13 08:47:15 2007 +0200
@@ -1203,7 +1203,10 @@
 		  (setq alist (cdr alist))))
               ;; If we can't deduce a mode from the file name,
               ;; look for an interpreter specified in the first line.
-	      (if (null mode)
+	      (if (and (null mode)
+		       (save-excursion ; XEmacs
+			 (goto-char (point-min))
+			 (looking-at "#!")))
                   (let ((firstline
                          (buffer-substring
                           (point-min)