From 69cb5a6daf592314438f6c9b30cc27e66197abb9 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 11 Sep 2012 21:03:50 +0200 Subject: [PATCH] .emacs.d/init.el --- .emacs.d/init.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 6957cd5..13b5435 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -346,6 +346,13 @@ If COUNT has been specified indent by that much, otherwise look at (local-set-key "\C-j" 'oni:newline-and-indent) (pretty-symbols-mode -1)) +(defun oni:js2-mode-func () + "Function for `js2-mode-hook'." + (oni:prog-mode-func) + (oni:js-mode-func) + (local-set-key (kbd "") #'slime-js-reload) + (slime-js-minor-mode)) + (defun oni:kill-region-or-backward-char () "Either `kill-region' or `backward-delete-char-untabify'." (interactive) @@ -815,7 +822,7 @@ for easy selection." (setq ido-default-buffer-method 'selected-window) (setq ido-max-window-height 1) (setq ido-save-directory-list-file nil) -(setq ido-ubiquitous-exceptions '(tmm-prompt)) +(setq ido-ubiquitous-command-exceptions '(oni:view-mail tmm-menubar)) (setq inferior-lisp-program "sbcl") (setq inhibit-default-init t) (setq inhibit-local-menu-bar-menus t) @@ -963,6 +970,7 @@ for easy selection." (add-hook 'jabber-chat-mode-hook 'oni:jabber-chat-mode-func) (add-hook 'java-mode-hook 'oni:java-mode-func) (add-hook 'js-mode-hook 'oni:js-mode-func) +(add-hook 'js2-mode-hook 'oni:js2-mode-func) (add-hook 'lisp-mode-hook 'oni:lisp-mode-func) (add-hook 'magit-log-edit-mode-hook 'oni:magit-log-edit-mode-func) (add-hook 'markdown-mode-hook 'oni:markdown-mode-func) @@ -1014,7 +1022,7 @@ for easy selection." (global-unset-key "\C-z")) (add-to-list 'auto-mode-alist '("\\.jl$" . sawfish-mode)) -(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js-mode)) +(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode)) (add-to-list 'auto-mode-alist '("\\.m\\(ark\\)?do?wn$" . markdown-mode)) (add-to-list 'auto-mode-alist '("\\.php[345]?$" . php-mode)) (add-to-list 'auto-mode-alist '("\\.po\\'\\|\\.po\\." . po-mode))