emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/international/mule.el,v


From: Romain Francoise
Subject: [Emacs-diffs] Changes to emacs/lisp/international/mule.el,v
Date: Fri, 05 Jan 2007 17:58:04 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Romain Francoise <rfrancoise>   07/01/05 17:58:03

Index: international/mule.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule.el,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -b -r1.249 -r1.250
--- international/mule.el       13 Dec 2006 01:13:57 -0000      1.249
+++ international/mule.el       5 Jan 2007 17:58:02 -0000       1.250
@@ -2292,7 +2292,12 @@
                        ;; In case of no header, search only 10 lines.
                        (forward-line 10))
                    (point))))
-  (when (re-search-forward 
"<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']"
 size t)
+  ;; Make sure that the buffer really contains an HTML document, by
+  ;; checking that it starts with a doctype or a <HTML> start tag
+  ;; (allowing for whitespace at bob).  Note: 'DOCTYPE NETSCAPE' is
+  ;; useful for Mozilla bookmark files.
+  (when (and (re-search-forward 
"\\`[[:space:]\n]*\\(<!doctype[[:space:]\n]+\\(html\\|netscape\\)\\|<html\\)" 
size t)
+            (re-search-forward 
"<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']"
 size t))
     (let* ((match (match-string 1))
           (sym (intern (downcase match))))
       (if (coding-system-p sym)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]