So what should we do about this function?
I suggest we make TAG-LIST optional and defaulted to
`html2text-remove-tag-list', i.e., (or tag-list
html2text-remove-tag-list). If called interactively, TAG-LIST should be
a space-or-comma-separated string of tags to remove.
Such a definition could be:
(defun html2text-remove-tags (&optional tag-list)
"Remove the tags in TAG-LIST.
If TAG-LIST is nil, use `html2text-remove-tag-list'.
If called interactively, "
(interactive "MTags to remove: ")
(setq tag-list (if (called-interactively-p 'any)
(split-string tag-list "[ ,]" t)
(or tag-list html2text-remove-tag-list)))
(dolist (tag tag-list)
(goto-char (point-min))
(while (re-search-forward (format "\\(</?%s[^>]*>\\)" tag) (point-max) t)
(delete-region (match-beginning 0) (match-end 0)))))
This definition would not break any existing code as far as I can tell
and both fixes and adds functionality.
What do you think?