Use c++-mode for JS files because of single char comment highlight but when
js-mode loaded.
BUG: all single char comments do not stop highlighting on end of line but go
to end of buffer.
--- a/.emacs-my Thu Jun 23 23:54:07 2011 +0300
+++ b/.emacs-my Fri Jun 24 18:00:56 2011 +0300
@@ -251,13 +251,6 @@
)
;;; ----------------------------------------------------------------
-;; Save and restore my buffers every time.
-(setq desktop-dirname "~/.emacs.d")
-(when (>= emacs-major-version 22)
- (desktop-save-mode 1)
- )
-
-;;; ----------------------------------------------------------------
(message "standart/general settings")
(when (boundp 'confirm-kill-emacs)
@@ -1462,10 +1455,13 @@
;;; ----------------------------------------------------------------
(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))
- )
+;; (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))
;;; ----------------------------------------------------------------
(message "bat file, batch")
@@ -1615,6 +1611,13 @@
(setq delete-auto-save-files t)
;;; ----------------------------------------------------------------
+;; Save and restore my buffers every time.
+(setq desktop-dirname "~/.emacs.d")
+(when (>= emacs-major-version 22)
+ (desktop-save-mode 1)
+ )
+
+;;; ----------------------------------------------------------------
(message "User welcome msg")
(add-hook 'emacs-startup-hook