diff options
| author | Kenichi Handa | 2006-06-02 03:54:14 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-06-02 03:54:14 +0000 |
| commit | b3a726d58695b200ffbd067b688dc02c383c8f7e (patch) | |
| tree | 4690331488a496a6d5d2ceaebcb1552d7b86479a | |
| parent | 605e71f10ee23495b4af108a650dbaf0bbb37753 (diff) | |
| download | emacs-b3a726d58695b200ffbd067b688dc02c383c8f7e.tar.gz emacs-b3a726d58695b200ffbd067b688dc02c383c8f7e.zip | |
(sgml-html-meta-auto-coding-function):
Limit the search by the end of the HTML header (if any).
| -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'." | |||
| 2256 | (setq size (min (+ (point) size) | 2256 | (setq size (min (+ (point) size) |
| 2257 | ;; Only search forward 10 lines | 2257 | ;; Only search forward 10 lines |
| 2258 | (save-excursion | 2258 | (save-excursion |
| 2259 | (forward-line 10) | 2259 | ;; Limit the search by the end of the HTML header. |
| 2260 | (or (search-forward "</head>" size t) | ||
| 2261 | ;; In case of no header, search only 10 lines. | ||
| 2262 | (forward-line 10)) | ||
| 2260 | (point)))) | 2263 | (point)))) |
| 2261 | (when (and (search-forward "<html" size t) | 2264 | (when (and (search-forward "<html" size t) |
| 2262 | (re-search-forward "<meta\\s-+http-equiv=\"content-type\"\\s-+content=\"text/\\sw+;\\s-*charset=\\(.+?\\)\"" size t)) | 2265 | (re-search-forward "<meta\\s-+http-equiv=\"content-type\"\\s-+content=\"text/\\sw+;\\s-*charset=\\(.+?\\)\"" size t)) |