From df3c9fe76a35f0bd541d49eabdd94bde4b4ec46a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 21 Sep 2007 03:19:43 +0000 Subject: [PATCH] Kevin Ryde (sgml-html-meta-auto-coding-function): Bind `case-fold-search' to t. --- lisp/ChangeLog | 5 +++++ lisp/international/mule.el | 39 +++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b8c6488fd2..efaa7aa0c31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-09-21 Kevin Ryde + + * international/mule.el (sgml-html-meta-auto-coding-function): + Bind `case-fold-search' to t. + 2007-09-21 Glenn Morris * textmodes/tex-mode.el (tex-validate-region): Handle escaped parens. diff --git a/lisp/international/mule.el b/lisp/international/mule.el index bfa2e7f1b39..afec59fd806 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2310,25 +2310,26 @@ This function is intended to be added to `auto-coding-functions'." (defun sgml-html-meta-auto-coding-function (size) "If the buffer has an HTML meta tag, use it to determine encoding. This function is intended to be added to `auto-coding-functions'." - (setq size (min (+ (point) size) - (save-excursion - ;; 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)))) - ;; Make sure that the buffer really contains an HTML document, by - ;; checking that it starts with a doctype or a start tag - ;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is - ;; useful for Mozilla bookmark files. - (when (and (re-search-forward "\\`[[:space:]\n]*\\(" size t) + ;; In case of no header, search only 10 lines. + (forward-line 10)) + (point)))) + ;; Make sure that the buffer really contains an HTML document, by + ;; checking that it starts with a doctype or a start tag + ;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is + ;; useful for Mozilla bookmark files. + (when (and (re-search-forward "\\`[[:space:]\n]*\\(