From ef44317c7cd6f5758d45ad8eaa14784682b5744a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 21 Sep 2007 03:21:39 +0000 Subject: [PATCH] Kevin Ryde (sgml-html-meta-auto-coding-function): Bind `case-fold-search' to t. --- admin/FOR-RELEASE | 3 +++ lisp/ChangeLog | 5 +++++ lisp/international/mule.el | 39 +++++++++++++++++++------------------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 70aa0c22922..c9b8c92c1a1 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -87,6 +87,9 @@ http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00020.html ** Bug/Patch view.el http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00073.html +** ses-mode runs unsafe functions even if you say "n" when prompted +http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00109.html + * FIXES FOR EMACS 22.3 Here we list any small fixes that arrived too late for Emacs 22.2, but diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 19f28e89f1a..c3909c0de09 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-20 Stefan Monnier * wid-edit.el (widget-image-insert): Don't merge mouse-face with diff --git a/lisp/international/mule.el b/lisp/international/mule.el index a7b97b16d20..2d6a0ce5e88 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2302,25 +2302,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]*\\(