diff options
author | Kenichi Handa <handa@m17n.org> | 2006-06-02 03:54:14 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2006-06-02 03:54:14 +0000 |
commit | b3a726d58695b200ffbd067b688dc02c383c8f7e (patch) | |
tree | 4690331488a496a6d5d2ceaebcb1552d7b86479a /lisp/international | |
parent | 605e71f10ee23495b4af108a650dbaf0bbb37753 (diff) | |
download | emacs-b3a726d58695b200ffbd067b688dc02c383c8f7e.tar.gz |
(sgml-html-meta-auto-coding-function):
Limit the search by the end of the HTML header (if any).
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/mule.el | 5 |
1 files changed, 4 insertions, 1 deletions
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 "</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)) |