Mercurial > emacs
changeset 71154:cb001b5b571b
(sgml-html-meta-auto-coding-function):
Limit the search by the end of the HTML header (if any).
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 02 Jun 2006 03:54:14 +0000 |
parents | d15d9ffb9a58 |
children | c4f7808cbe56 |
files | lisp/international/mule.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule.el Fri Jun 02 03:53:55 2006 +0000 +++ b/lisp/international/mule.el Fri Jun 02 03:54:14 2006 +0000 @@ -2256,7 +2256,10 @@ (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 "</head>" size t) + ;; In case of no header, search only 10 lines. + (forward-line 10)) (point)))) (when (and (search-forward "<html" size t) (re-search-forward "<meta\\s-+http-equiv=\"content-type\"\\s-+content=\"text/\\sw+;\\s-*charset=\\(.+?\\)\"" size t))