htmlファイルのプレビュー

Mac OS X 10.7.2 + Emacs 23.3

sudo port install emacs-w3m

emacs-w3mインストール後、init.elに

(require 'w3m-load)
(setq w3m-default-display-inline-images t)
;; 現在編集中のファイルをw3mでプレビュー
(defun preview-w3m ()
  (interactive)
  (w3m-goto-url buffer-file-name nil "text/html"))
(global-set-key "\C-c\C-e" 'preview-w3m)

拡張子.htm(l)のファイル編集中にC-c C-eでプレビュー。