changeset 19665:f523227a99ab

(set-auto-coding): Recognize coding: in first line even if not the first variable.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 Sep 1997 22:44:22 +0000
parents d206d8b146dc
children 81957e8b80e2
files lisp/international/mule.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Mon Sep 01 22:43:29 1997 +0000
+++ b/lisp/international/mule.el	Mon Sep 01 22:44:22 1997 +0000
@@ -645,10 +645,10 @@
 	      (or limit
 		  (setq limit len)))
 	  (setq limit len))
-	(when (and (string-match "-\\*-[ \t]*coding:[ \t]*\\([^ ;]+\\)" string)
-		   (< (match-beginning 1) limit))
+	(when (and (string-match "-\\*-\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)" string)
+		   (< (match-beginning 2) limit))
 	  (setq coding-system
-		(intern (substring string (match-beginning 1) (match-end 1))))
+		(intern (substring string (match-beginning 2) (match-end 2))))
 	  (if (not (coding-system-p coding-system))
 	      (setq coding-system nil)))