-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi, i use the following function to translate unicode and other
entities found on the web into ascii that i can view in emacs-w3m. i
am concerned that each search and replace as done in my example is
inefficient, is there a better way to do this? i.e., is there a better
way to group search/replace pairs? thanks in advance!
(defun w3m-filter-brad (url)
(goto-char (point-min))
(while (re-search-forward "»" nil t)
(replace-match ">>"))
(goto-char (point-min))
(while (re-search-forward "’" nil t)
(replace-match "'"))
(goto-char (point-min))
(while (re-search-forward "“" nil t)
(replace-match "\""))
(goto-char (point-min))
(while (re-search-forward "”" nil t)
(replace-match "\""))
(goto-char (point-min))
(while (re-search-forward "—" nil t)
(replace-match "-"))
(goto-char (point-min))
(while (re-search-forward "«" nil t)
(replace-match "<"))
(goto-char (point-min))
(while (re-search-forward "»" nil t)
(replace-match ">"))
(goto-char (point-min))
(while (re-search-forward "ö" nil t)
(replace-match "o"))
)