forked from redguardtoo/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-moz.el
24 lines (20 loc) · 862 Bytes
/
init-moz.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(autoload 'moz-minor-mode "moz" "Mozilla Minor and Inferior Mozilla Modes" t)
(defun moz-custom-setup ()
(moz-minor-mode 1)
;; @see http://www.emacswiki.org/emacs/MozRepl
;; Example - you may want to add hooks for your own modes.
;; I also add this to python-mode when doing django development.
(auto-reload-firefox-on-after-save-hook)
)
(add-hook 'js2-mode-hook 'moz-custom-setup)
(add-hook 'html-mode-hook 'moz-custom-setup)
(add-hook 'nxml-mode-hook 'moz-custom-setup)
(add-hook 'web-mode-hook 'moz-custom-setup)
(defun auto-reload-firefox-on-after-save-hook ()
(add-hook 'after-save-hook
'(lambda ()
(interactive)
(comint-send-string (inferior-moz-process)
"setTimeout(BrowserReload(), '500');"))
'append 'local)) ;; buffer-local
(provide 'init-moz)