From 6b66d0289ef51b4f9b923b656a7597308461b318 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Dec 2001 00:13:42 +0000 Subject: [PATCH] (set-auto-coding): Use set-auto-mode-1. --- lisp/ChangeLog | 10 ++++++++++ lisp/international/mule.el | 16 ++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bd7496b855f..1821419e666 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2001-12-11 Richard M. Stallman + + * international/mule.el (set-auto-coding): Use set-auto-mode-1. + + * files.el (set-auto-mode-1): New subroutine, broken out of + set-auto-mode. + (set-auto-mode, hack-local-variables-prop-line): Use that. + 2001-12-11 Dave Love * language/thai-util.el, language/thai.el: Add Unicode @@ -14,6 +22,8 @@ 2001-12-11 Richard M. Stallman + * emacs-lisp/authors.el (authors-aliases): Delete "Richard Stallmao". + * textmodes/ispell.el (ispell-buffer-local-parsing): Match xml like sgml. diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 9ffc9dc54e7..a39e2145d82 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1386,26 +1386,18 @@ function by default." ;; 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) -- 2.39.2