       js2-bounce-indent-p nil)
 
 (eval-after-load 'js2-mode '(js2-imenu-extras-setup))
-
-;; js3-mode
-(add-hook 'js3-mode-hook '(lambda () (setq mode-name "JS3")))
-(setq js3-auto-indent-p t
-      js3-enter-indents-newline t
-      js3-indent-on-enter-key t
-      js3-indent-level preferred-javascript-indent-level)
 
 ;; js-mode
 (setq js-indent-level preferred-javascript-indent-level)

(require-package 'json)
(require-package 'js3-mode)
(when (>= emacs-major-version 24)
  (require-package 'js2-mode)
  (require-package 'ac-js2))



(defcustom preferred-javascript-mode
  (first (remove-if-not #'fboundp '(js2-mode js-mode)))
  "Javascript mode to use for .js files."
  :type 'symbol
  :group 'programming
  :options '(js2-mode js-mode))
(defvar preferred-javascript-indent-level 2)

;; Need to first remove from list if present, since elpa adds entries too, which
