Skip to content
Browse files

switch to js2-mode from mooz. much better

  • Loading branch information...
1 parent cc7fa4d commit 847b02ddb89c6210e9dad3ba5a83668286e5b658 @gurgeous committed Apr 25, 2012
View
7,179 emacslib/js2.el → emacslib/js2-mode.el
3,445 additions, 3,734 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN emacslib/js2.elc → emacslib/js2-mode.elc
Binary file not shown.
View
25 lisp/loaddefs.el
@@ -230,7 +230,7 @@ Initialize the color theme package by loading color-theme-libraries.
;;;;;; csharp-make-tool csharp-want-imenu csharp-want-yasnippet-fixup
;;;;;; csharp-want-flymake-fixup csharp-mode-hook) "csharp-mode-0.8.5"
;;;;;; "../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/csharp-mode-0.8.5.el"
-;;;;;; (20163 2407))
+;;;;;; (20163 2893))
;;; Generated autoloads from ../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/csharp-mode-0.8.5.el
(defvar csharp-mode-hook nil "\
@@ -496,7 +496,7 @@ Not documented
;;;***
;;;### (autoloads (haml-mode) "haml-mode" "../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/haml-mode.el"
-;;;;;; (19631 21426))
+;;;;;; (20360 30858))
;;; Generated autoloads from ../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/haml-mode.el
(autoload 'haml-mode "haml-mode" "\
@@ -577,12 +577,12 @@ HTMLize dired-marked files.
;;;***
-;;;### (autoloads (js2-mode) "js2" "../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/js2.el"
-;;;;;; (19755 25076))
-;;; Generated autoloads from ../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/js2.el
+;;;### (autoloads (js2-mode) "js2-mode" "../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/js2-mode.el"
+;;;;;; (20376 20302))
+;;; Generated autoloads from ../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/js2-mode.el
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
-(autoload 'js2-mode "js2" "\
+(autoload 'js2-mode "js2-mode" "\
Major mode for editing JavaScript code.
\(fn)" t nil)
@@ -623,18 +623,23 @@ Major mode for editing PHP code.
;;;***
;;;### (autoloads (ruby-mode) "ruby-mode" "../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/ruby/ruby-mode.el"
-;;;;;; (19530 3684))
+;;;;;; (20262 2475))
;;; Generated autoloads from ../../../../../../mnt/d2/home/amd/Dropbox/work/elisp/emacslib/ruby/ruby-mode.el
(autoload 'ruby-mode "ruby-mode" "\
-Major mode for editing ruby scripts.
-\\[ruby-indent-command] properly indents subexpressions of multi-line
+Major mode for editing Ruby scripts.
+\\[ruby-indent-line] properly indents subexpressions of multi-line
class, module, def, if, while, for, do, and case statements, taking
nesting into account.
-The variable ruby-indent-level controls the amount of indentation.
+The variable `ruby-indent-level' controls the amount of indentation.
+
\\{ruby-mode-map}
\(fn)" t nil)
+(add-to-list 'auto-mode-alist (cons (purecopy "\\.rb\\'") 'ruby-mode))
+
+(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
+
;;;***
View
BIN lisp/loaddefs.elc
Binary file not shown.
View
17 modes.el
@@ -246,22 +246,23 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; js
-(eval-when-compile (load "js2"))
-(setq js2-mirror-mode nil)
+(eval-when-compile (load "js2-mode"))
(defun my-js2-setup ()
(make-local-variable 'backward-delete-char-untabify-method)
(setq
backward-delete-char-untabify-method 'untabify
- indent-line-function 'indent-relative-maybe
- js2-auto-indent-p nil
js2-mode-escape-quotes nil
+ js2-basic-offset 2
+ js2-enter-indents-newline t
tab-width 2)
- (define-key js2-mode-map "\C-m" 'newline-and-indent)
- (make-local-variable 'standard-indent)
- (setq standard-indent 2)
+ ;; use this to turn OFF the standard js stuff
+ ;; indent-line-function 'indent-relative-maybe
+ ;; (define-key js2-mode-map "\C-m" 'newline-and-indent)
+ ;; (make-local-variable 'standard-indent)
+ ;; (setq standard-indent 2)
(define-key js2-mode-map [C-left] 'my-decrease)
(define-key js2-mode-map [C-right] 'my-increase))
-(eval-after-load "js2"
+(eval-after-load "js2-mode"
'(add-hook 'js2-mode-hook 'my-js2-setup))
;; coffee
View
BIN modes.elc
Binary file not shown.

0 comments on commit 847b02d

Please sign in to comment.
Something went wrong with that request. Please try again.