EMACS: Added a 'preview' function for HMTL files

This commit is contained in:
Tom Willemsen 2011-05-28 15:25:58 +02:00
parent b3dee4f7f4
commit 5690154ecb
3 changed files with 10 additions and 0 deletions

View file

@ -34,3 +34,7 @@
(if (string= (substring ext 0 1) "c")
(find-file (concat noext ".h"))
(find-file (concat noext ".c")))))
(defun browse-to-current-file ()
(interactive)
(browse-url buffer-file-name))

View file

@ -8,6 +8,8 @@
; possible fontification
inhibit-default-init t ; don't load default init
scroll-conservatively 10000 ; scroll only one line
browse-url-browser-function 'browse-url-generic
browse-url-generic-program "conkeror"
whitespace-style '(face trailing)
backup-directory-alist ; backup file location
`((".*" .

4
emacs.d/20-html-mode.el Normal file
View file

@ -0,0 +1,4 @@
(add-hook 'html-mode-hook
(lambda ()
(local-set-key [f9] 'browse-to-current-file)
(auto-fill-mode)))