emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/gnus/html2text.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/html2text.el,v
Date: Sun, 28 Oct 2007 09:19:14 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/10/28 09:18:40

Index: lisp/gnus/html2text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/html2text.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- lisp/gnus/html2text.el      27 Oct 2007 09:07:09 -0000      1.15
+++ lisp/gnus/html2text.el      28 Oct 2007 09:18:31 -0000      1.16
@@ -43,8 +43,42 @@
 (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
 
 (defvar html2text-replace-list
-  '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")
-    ("&amp;" . "&") ("&apos;" . "'"))
+  '(("&acute;" . "`")
+    ("&amp;" . "&")
+    ("&apos;" . "'")
+    ("&brvbar;" . "|")
+    ("&cent;" . "c")
+    ("&circ;" . "^")
+    ("&copy;" . "(C)")
+    ("&curren;" . "(#)")
+    ("&deg;" . "degree")
+    ("&divide;" . "/")
+    ("&euro;" . "e")
+    ("&frac12;" . "1/2")
+    ("&gt;" . ">")
+    ("&iquest;" . "?")
+    ("&laquo;" . "<<")
+    ("&ldquo" . "\"")
+    ("&lsaquo;" . "(")
+    ("&lsquo;" . "`")
+    ("&lt;" . "<")
+    ("&mdash;" . "--")
+    ("&nbsp;" . " ")
+    ("&ndash;" . "-")
+    ("&permil;" . "%%")
+    ("&plusmn;" . "+-")
+    ("&pound;" . "£")
+    ("&quot;" . "\"")
+    ("&raquo;" . ">>")
+    ("&rdquo" . "\"")
+    ("&reg;" . "(R)")
+    ("&rsaquo;" . ")")
+    ("&rsquo;" . "'")
+    ("&sect;" . "§")
+    ("&sup1;" . "^1")
+    ("&sup2;" . "^2")
+    ("&sup3;" . "^3")
+    ("&tilde;" . "~"))
   "The map of entity to text.
 
 This is an alist were each element is a dotted pair consisting of an
@@ -229,12 +263,12 @@
   (goto-char p1)
   (let ((item-nr 0)
        (items   0))
-    (while (re-search-forward "<li>" p2 t)
+    (while (search-forward "<li>" p2 t)
       (setq items (1+ items)))
     (goto-char p1)
     (while (< item-nr items)
       (setq item-nr (1+ item-nr))
-      (re-search-forward "<li>" (point-max) t)
+      (search-forward "<li>" (point-max) t)
       (cond
        ((string= list-type "ul") (insert " o "))
        ((string= list-type "ol") (insert (format " %s: " item-nr)))
@@ -244,7 +278,7 @@
   (goto-char p1)
   (let ((items   0)
        (item-nr 0))
-    (while (re-search-forward "<dt>" p2 t)
+    (while (search-forward "<dt>" p2 t)
       (setq items (1+ items)))
     (goto-char p1)
     (while (< item-nr items)
@@ -342,8 +376,7 @@
 
 (defun html2text-fix-paragraph (p1 p2)
   (goto-char p1)
-  (let ((has-br-line)
-       (refill-start)
+  (let ((refill-start)
        (refill-stop))
     (when (re-search-forward "<br>$" p2 t)
       (goto-char p1)




reply via email to

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