changeset 71220:4331609429da

(find-auto-coding): Handle enable-character-translation in file header.
author Kenichi Handa <handa@m17n.org>
date Mon, 05 Jun 2006 07:11:33 +0000
parents 316592ff4147
children 07cd76eb8e03
files lisp/international/mule.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule.el	Mon Jun 05 07:11:13 2006 +0000
+++ b/lisp/international/mule.el	Mon Jun 05 07:11:33 2006 +0000
@@ -1700,6 +1700,8 @@
 	;; and for "unibyte:" at the head and tail of SIZE bytes.
 	(setq head-found (or (search-forward "coding:" head-end t)
 			     (search-forward "unibyte:" head-end t)
+			     (search-forward "enable-character-translation:" 
+					     head-end t)
 			     (search-forward "char-trans:" head-end t)))
 	(if (and head-found (> head-found tail-start))
 	    ;; Head and tail are overlapped.
@@ -1729,9 +1731,9 @@
 			head-end t))
 	      (setq coding-system (intern (match-string 2))))
 	    (when (re-search-forward
-		   "\\(.*;\\)?[ \t]*char-trans:[ \t]*\\([^ ;]+\\)"
+		   "\\(.*;\\)?[ \t]*\\(enable-character-translation\\|char-trans\\):[ \t]*\\([^ ;]+\\)"
 		   head-end t)
-	      (setq char-trans (match-string 2)))))
+	      (setq char-trans (match-string 3)))))
 
 	;; If no coding: tag in the head, check the tail.
 	;; Here we must pay attention to the case that the end-of-line