comparison lisp/international/mule.el @ 91802:3a35316b344f

(sgml-html-meta-auto-coding-function): Make sure the search limit is ahead.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 12 Feb 2008 21:21:02 +0000
parents 606f2d163a64
children 89b7a215ead9
comparison
equal deleted inserted replaced
91801:8e06d480f634 91802:3a35316b344f
2295 This function is intended to be added to `auto-coding-functions'." 2295 This function is intended to be added to `auto-coding-functions'."
2296 (let ((case-fold-search t)) 2296 (let ((case-fold-search t))
2297 (setq size (min (+ (point) size) 2297 (setq size (min (+ (point) size)
2298 (save-excursion 2298 (save-excursion
2299 ;; Limit the search by the end of the HTML header. 2299 ;; Limit the search by the end of the HTML header.
2300 (or (search-forward "</head>" size t) 2300 (or (search-forward "</head>" (+ (point) size) t)
2301 ;; In case of no header, search only 10 lines. 2301 ;; In case of no header, search only 10 lines.
2302 (forward-line 10)) 2302 (forward-line 10))
2303 (point)))) 2303 (point))))
2304 ;; Make sure that the buffer really contains an HTML document, by 2304 ;; Make sure that the buffer really contains an HTML document, by
2305 ;; checking that it starts with a doctype or a <HTML> start tag 2305 ;; checking that it starts with a doctype or a <HTML> start tag