From: Michael Orlitzky Date: Sat, 25 Feb 2012 19:44:58 +0000 (-0500) Subject: Switch from ecmascript-mode to js-mode, which is built in to Emacs 23.2. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c01d402ee4c09eab8dea768455d1566aa06ab227;p=emacs.d.git Switch from ecmascript-mode to js-mode, which is built in to Emacs 23.2. --- diff --git a/auto-modes.el b/auto-modes.el index 21149ac..da87ef8 100644 --- a/auto-modes.el +++ b/auto-modes.el @@ -24,11 +24,11 @@ ;; ebuild-mode '("\\.ebuild$" . ebuild-mode) - ;; ecmascript-mode - '("\\.js$" . ecmascript-mode) + ;; js-mode + '("\\.js$" . js-mode) ;; haskell-mode - '("\\.hs$" . haskell-mode) + '("\\.l?hs$" . haskell-mode) ;; nagios-mode '("\\.cfg$" . nagios-mode) @@ -39,12 +39,13 @@ '("\\.xml$" . nxml-mode) '("\\.?html$" . nxml-mode) '("\\.config$" . nxml-mode) - '("\\.tpl$" . nxml-mode) + '("\\.tpl$" . nxml-mode) ;; Smarty templates '("\\.rdf$" . nxml-mode) '("\\.xul$" . nxml-mode) ;; php-mode '("\\.php$" . php-mode) + '("\\.module$" . php-mode) ;; Drupal modules ;; python-mode '("\\.pyx?$" . python-mode) diff --git a/mode-hooks.el b/mode-hooks.el index ef9685e..0e56534 100644 --- a/mode-hooks.el +++ b/mode-hooks.el @@ -3,7 +3,7 @@ (load-library "basic-mode-hooks") (load-library "csharp-mode-hooks") (load-library "css-mode-hooks") -(load-library "ecmascript-mode-hooks") +(load-library "js-mode-hooks") (load-library "erc-mode-hooks") (load-library "haskell-mode-hooks") (load-library "nxml-mode-hooks") diff --git a/mode-hooks/ecmascript-mode-hooks.el b/mode-hooks/ecmascript-mode-hooks.el deleted file mode 100644 index 45303e4..0000000 --- a/mode-hooks/ecmascript-mode-hooks.el +++ /dev/null @@ -1,7 +0,0 @@ -(defun esm-hook() - (setq c-indentation-style "gnu") - (setq c-basic-offset 2) - ) - - -(add-hook 'ecmascript-mode-hook (function esm-hook)) diff --git a/mode-hooks/js-mode-hooks.el b/mode-hooks/js-mode-hooks.el new file mode 100644 index 0000000..6b76b55 --- /dev/null +++ b/mode-hooks/js-mode-hooks.el @@ -0,0 +1,6 @@ +(defun jsm-hook() + (setq js-indent-level 2) + ) + + +(add-hook 'js-mode-hook (function jsm-hook))