[gnus git] branch master updated: m0-7-120-gb6cfb4b =1= eww.el (eww-detect-charset): Improve regexp; move backward

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  b6cfb4b5425506ac4d2f8b919296d4cb7c46943e (commit)
      from  26c3b2dde98792a08f156f68542767c99554c7f0 (commit)


- Log -----------------------------------------------------------------
commit b6cfb4b5425506ac4d2f8b919296d4cb7c46943e
Author: Katsumi Yamaoka <[email protected]>
Date:   Tue Jun 18 09:27:19 2013 +0000

    eww.el (eww-detect-charset): Improve regexp; move backward

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5ad1ddb..bc4f9fc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-18  Katsumi Yamaoka  <[email protected]>
+
+	* eww.el (eww-detect-charset): Improve regexp; move backward.
+
 2013-06-18  Glenn Morris  <[email protected]>
 
 	* mm-decode.el (widget-convert-button): Autoload.
diff --git a/lisp/eww.el b/lisp/eww.el
index 36baf35..3914f06 100644
--- a/lisp/eww.el
+++ b/lisp/eww.el
@@ -64,18 +64,6 @@
     (setq url (concat "http://" url)))
   (url-retrieve url 'eww-render (list url)))
 
-(defun eww-detect-charset (html-p)
-  (let ((case-fold-search t)
-	(pt (point)))
-    (or (and html-p
-	     (re-search-forward
-	      "<meta[\t\n\r ]+[^>]*charset=\\([^\t\n\r \"/>]+\\)" nil t)
-	     (goto-char pt)
-	     (match-string 1))
-	(and (looking-at
-	      "[\t\n\r ]*<\\?xml[\t\n\r ]+[^>]*encoding=\"\\([^\"]+\\)")
-	     (match-string 1)))))
-
 (defun eww-render (status url &optional point)
   (let ((redirect (plist-get status :redirect)))
     (when redirect
@@ -128,6 +116,18 @@
       (forward-line 1))
     headers))
 
+(defun eww-detect-charset (html-p)
+  (let ((case-fold-search t)
+	(pt (point)))
+    (or (and html-p
+	     (re-search-forward
+	      "<meta[\t\n\r ]+[^>]*charset=\"?\\([^\t\n\r \"/>]+\\)" nil t)
+	     (goto-char pt)
+	     (match-string 1))
+	(and (looking-at
+	      "[\t\n\r ]*<\\?xml[\t\n\r ]+[^>]*encoding=\"\\([^\"]+\\)")
+	     (match-string 1)))))
+
 (defun eww-display-html (charset url)
   (unless (eq charset 'utf8)
     (decode-coding-region (point) (point-max) charset))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    4 ++++
 lisp/eww.el    |   24 ++++++++++++------------
 2 files changed, 16 insertions(+), 12 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.