summaryrefslogtreecommitdiff
path: root/lisp/gnus/html2text.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-28 09:18:39 +0000
committerMiles Bader <miles@gnu.org>2007-10-28 09:18:39 +0000
commit7acfe7006a29f196283f1488b88e546bdebb207b (patch)
tree11190af7679ebb491870728f72f8a0b869dba9f0 /lisp/gnus/html2text.el
parente0887698f7860adb7c57ed690b0a1e6b01ea2635 (diff)
downloademacs-7acfe7006a29f196283f1488b88e546bdebb207b.tar.gz
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-911
Diffstat (limited to 'lisp/gnus/html2text.el')
-rw-r--r--lisp/gnus/html2text.el47
1 files changed, 40 insertions, 7 deletions
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el
index 9f0916f797b..6de2904adb4 100644
--- a/lisp/gnus/html2text.el
+++ b/lisp/gnus/html2text.el
@@ -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 @@ formatting, and then moved afterward.")
(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 @@ formatting, and then moved afterward.")
(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 @@ formatting, and then moved afterward.")
(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)