Fix up comment convention on the arch-tag lines.
[bpt/emacs.git] / lisp / gnus / html2text.el
CommitLineData
23f87bed 1;;; html2text.el --- a simple html to plain text converter
e84b4b86 2
e3fe4da0 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
23f87bed
MB
4
5;; Author: Joakim Hove <hove@phys.ntnu.no>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
5a9dffec 11;; the Free Software Foundation; either version 3, or (at your option)
23f87bed
MB
12;; any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs; see the file COPYING. If not, write to the
3a35cf56
LK
21;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22;; Boston, MA 02110-1301, USA.
23f87bed
MB
23
24;;; Commentary:
25
26;; These functions provide a simple way to wash/clean html infected
27;; mails. Definitely do not work in all cases, but some improvement
e2642250 28;; in readability is generally obtained. Formatting is only done in
23f87bed
MB
29;; the buffer, so the next time you enter the article it will be
30;; "re-htmlized".
31;;
e2642250 32;; The main function is `html2text'.
23f87bed
MB
33
34;;; Code:
35
36;;
37;; <Global variables>
38;;
39
40(eval-when-compile
41 (require 'cl))
42
43(defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
44
45(defvar html2text-replace-list
01c52d31
MB
46 '(("&acute;" . "`")
47 ("&amp;" . "&")
48 ("&apos;" . "'")
49 ("&brvbar;" . "|")
50 ("&cent;" . "c")
51 ("&circ;" . "^")
52 ("&copy;" . "(C)")
53 ("&curren;" . "(#)")
54 ("&deg;" . "degree")
55 ("&divide;" . "/")
56 ("&euro;" . "e")
57 ("&frac12;" . "1/2")
58 ("&gt;" . ">")
59 ("&iquest;" . "?")
60 ("&laquo;" . "<<")
61 ("&ldquo" . "\"")
62 ("&lsaquo;" . "(")
63 ("&lsquo;" . "`")
64 ("&lt;" . "<")
65 ("&mdash;" . "--")
66 ("&nbsp;" . " ")
67 ("&ndash;" . "-")
68 ("&permil;" . "%%")
69 ("&plusmn;" . "+-")
70