diff -r 9382e2dce0ed -r 72d443fe2b1d .emacs-my --- a/.emacs-my Tue Oct 16 21:15:57 2012 +0300 +++ b/.emacs-my Wed Oct 17 13:26:01 2012 +0300 @@ -2258,13 +2258,15 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "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)) -;; ) - -(setq auto-mode-alist (rassq-delete-all 'js-mode auto-mode-alist)) -(add-to-list 'auto-mode-alist '("\\.js$" . c++-mode)) +(if (>= emacs-major-version 23) + (add-to-list 'auto-mode-alist '("\\.js$" . js-mode)) + (add-to-list 'auto-mode-alist '("\\.js$" . javascript-generic-mode)) + ) + +;; BUG: all single char comments do not stop highlighting on end of line but +;; go to end of buffer. To fix use code: +;; (setq auto-mode-alist (rassq-delete-all 'js-mode auto-mode-alist)) +;; (add-to-list 'auto-mode-alist '("\\.js$" . c++-mode)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "bat file, batch")