X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fbytecomp.el;h=68d0fb3ccb8490d54e34db4918402800d3dc9ce0;hb=d1082579328f7de2c387356eec226b869f8a2cc7;hp=d8ab7892acff906d85340b11d345fb86b8d61147;hpb=976b002b16336930724ae22476014583ad022e7d;p=chise%2Fxemacs-chise.git diff --git a/lisp/bytecomp.el b/lisp/bytecomp.el index d8ab789..68d0fb3 100644 --- a/lisp/bytecomp.el +++ b/lisp/bytecomp.el @@ -1747,7 +1747,7 @@ With argument, insert value in current buffer after the form." ;; file if under Mule. If there are any extended characters in the ;; input file, use `escape-quoted' to make sure that both binary and ;; extended characters are output properly and distinguished properly. - ;; Otherwise, use `no-conversion' for maximum portability with non-Mule + ;; Otherwise, use `raw-text' for maximum portability with non-Mule ;; Emacsen. (when (featurep 'mule) (defvar buffer-file-coding-system) @@ -1757,10 +1757,19 @@ With argument, insert value in current buffer after the form." ;; mrb- There must be a better way than skip-chars-forward (skip-chars-forward (concat (char-to-string 0) "-" (char-to-string 255))) - (eq (point) (point-max))) - (setq buffer-file-coding-system 'no-conversion) - (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") - (setq buffer-file-coding-system 'escape-quoted) + (and (eq (point) (point-max)) + (not + (re-search-backward + "\\\\u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]" nil t)))) + (setq buffer-file-coding-system 'raw-text) + (cond ((featurep 'utf-2000) + (insert "(require 'mule)\n;;;###coding system: utf-8\n") + (setq buffer-file-coding-system 'utf-8) + ) + (t + (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") + (setq buffer-file-coding-system 'escape-quoted) + )) ;; #### Lazy loading not yet implemented for MULE files ;; mrb - Fix this someday. (save-excursion