--- a/.emacs-my Tue Nov 09 21:49:55 2010 +0200
+++ b/.emacs-my Tue Nov 09 22:53:33 2010 +0200
@@ -975,8 +975,6 @@
(add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
-(add-to-list 'auto-mode-alist '("\\.js$" . js-mode))
-
(defun my-c++-header-file-p ()
"Return non-nil, if in a C++ header."
(and (string-match "\\.h$"
@@ -1224,6 +1222,13 @@
))
))
+;;; ----------------------------------------------------------------
+;;; javascript, js.
+
+(if (>= emacs-major-version 23)
+ (add-to-list 'auto-mode-alist '("\\.js$" . js-mode))
+ (add-to-list 'auto-mode-alist '("\\.js$" . javascript-generic-mode))
+ )
;;; ----------------------------------------------------------------
;;; bat file, batch.