From: Richard M. Stallman Date: Mon, 1 Sep 1997 22:44:22 +0000 (+0000) Subject: (set-auto-coding): Recognize coding: in first X-Git-Tag: emacs-20.1~283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35ce8cd7933732811dfcbc2d93f6cc0d5aca6305;p=emacs.git (set-auto-coding): Recognize coding: in first line even if not the first variable. --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 05631e1a1bc..655eccb7452 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -645,10 +645,10 @@ function by default." (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)))