(add-to-list 'load-path (expand-file-name (concat zonix-elisp-dir "w3m")))
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
(autoload 'w3m-browse-url "w3m" "w3m interface function for browse-url.el." t)
(autoload 'w3m-find-file "w3m" "w3m Interface function for local file." t)
(setq w3m-coding-system 'iso-8859-1
w3m-input-coding-system 'iso-8859-1
w3m-output-coding-system 'iso-8859-1
w3m-arrived-file-coding-system 'iso-8859-1
w3m-search-default-coding-system 'iso-8859-1
w3m-terminal-coding-system 'iso-8859-1
w3m-file-name-coding-system 'iso-8859-1
w3m-use-mule-ucs t
w3m-mailto-url-function 'compose-mail
w3m-default-save-directory "~/tmp/down/"
w3m-icon-directory (expand-file-name (concat zonix-elisp-dir "w3m/icons"))
w3m-key-binding 'info
w3m-use-form t
w3m-use-filter t
w3m-delete-duplicated-empty-lines t
w3m-async-exec t
w3m-fill-column 99
)
(standard-display-ascii ?\212 "-")
(standard-display-ascii ?\226 "-")
(when (>= emacs-major-version 21)
(setq w3m-display-inline-image t))
(require 'w3m)
(defun cc-w3m-beautify-tables()
(goto-char (point-min))
(while (re-search-forward
"\200\\|\203\\|\206\\|\211\\|\214\\|\202\\|\204\\|\210\\|\201" nil t)
(replace-match "+"))
(goto-char (point-min))
(while (re-search-forward "\205" nil t)
(replace-match "|"))
(goto-char (point-min))
(while (re-search-forward "\212" nil t)
(replace-match "-")))
(add-hook 'w3m-fontify-after-hook 'cc-w3m-beautify-tables)
(defun cc-w3m-del-trailing-ws()
(goto-char (point-min))
(while (re-search-forward "[ \t]+$" nil t)
(replace-match "")))
(add-hook 'w3m-fontify-after-hook 'cc-w3m-del-trailing-ws)