changeset 41973:903480208cfd

(set-auto-coding): Use set-auto-mode-1.
author Richard M. Stallman <rms@gnu.org>
date Wed, 12 Dec 2001 00:12:09 +0000
parents faa66f17e91f
children f59183ee53c5
files lisp/international/mule.el
diffstat 1 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Wed Dec 12 00:10:17 2001 +0000
+++ b/lisp/international/mule.el	Wed Dec 12 00:12:09 2001 +0000
@@ -1386,26 +1386,18 @@
 	;; At first check the head.
 	(when head-found
 	  (goto-char head-start)
-	  (setq pos (re-search-forward "[\n\r]" head-end t))
-	  (if (and pos
-		   (= (char-after head-start) ?#)
-		   (= (char-after (1+ head-start)) ?!))
-	      ;; If the file begins with "#!" (exec interpreter magic),
-	      ;; look for coding frobs in the first two lines.  You cannot
-	      ;; necessarily put them in the first line of such a file
-	      ;; without screwing up the interpreter invocation.
-	      (setq pos (search-forward "\n" head-end t)))
-	  (if pos (setq head-end pos))
+	  (setq head-end (set-auto-mode-1))
+	  (setq head-start (point))
 	  (when (< head-found head-end)
 	    (goto-char head-start)
 	    (when (and set-auto-coding-for-load
 		       (re-search-forward
-			"-\\*-\\(.*;\\)?[ \t]*unibyte:[ \t]*\\([^ ;]+\\)"
+			"\\(.*;\\)?[ \t]*unibyte:[ \t]*\\([^ ;]+\\)"
 			head-end t))
 	      (setq coding-system 'raw-text))
 	    (when (and (not coding-system)
 		       (re-search-forward
-			"-\\*-\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)"
+			"\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)"
 			head-end t))
 	      (setq coding-system (intern (match-string 2)))
 	      (or (coding-system-p coding-system)