From b3a726d58695b200ffbd067b688dc02c383c8f7e Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Jun 2006 03:54:14 +0000 Subject: [PATCH] (sgml-html-meta-auto-coding-function): Limit the search by the end of the HTML header (if any). --- lisp/international/mule.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 "