From: Kenichi Handa Date: Fri, 2 Jun 2006 03:54:14 +0000 (+0000) Subject: (sgml-html-meta-auto-coding-function): X-Git-Tag: emacs-pretest-22.0.90~2125 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3a726d58695b200ffbd067b688dc02c383c8f7e;p=emacs.git (sgml-html-meta-auto-coding-function): Limit the search by the end of the HTML header (if any). --- diff --git a/lisp/international/mule.el b/lisp/international/mule.el index b66345ea3a8..c2d398b440e 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2256,7 +2256,10 @@ This function is intended to be added to `auto-coding-functions'." (setq size (min (+ (point) size) ;; Only search forward 10 lines (save-excursion - (forward-line 10) + ;; Limit the search by the end of the HTML header. + (or (search-forward "" size t) + ;; In case of no header, search only 10 lines. + (forward-line 10)) (point)))) (when (and (search-forward "