.emacs-my
changeset 508 79bcafd3d45f
parent 507 58e5a1067495
child 512 416623895658
equal deleted inserted replaced
507:58e5a1067495 508:79bcafd3d45f
   972 
   972 
   973 ;;; ----------------------------------------------------------------
   973 ;;; ----------------------------------------------------------------
   974 ;;; devel, prog, programming.
   974 ;;; devel, prog, programming.
   975 
   975 
   976 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
   976 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
   977 
       
   978 (add-to-list 'auto-mode-alist '("\\.js$" . js-mode))
       
   979 
   977 
   980 (defun my-c++-header-file-p ()
   978 (defun my-c++-header-file-p ()
   981   "Return non-nil, if in a C++ header."
   979   "Return non-nil, if in a C++ header."
   982   (and (string-match "\\.h$"
   980   (and (string-match "\\.h$"
   983                      (or (buffer-file-name)
   981                      (or (buffer-file-name)
  1222             (awk-mode . "awk")
  1220             (awk-mode . "awk")
  1223             (other . "my")
  1221             (other . "my")
  1224             ))
  1222             ))
  1225     ))
  1223     ))
  1226 
  1224 
       
  1225 ;;; ----------------------------------------------------------------
       
  1226 ;;; javascript, js.
       
  1227 
       
  1228 (if (>= emacs-major-version 23)
       
  1229     (add-to-list 'auto-mode-alist '("\\.js$" . js-mode))
       
  1230   (add-to-list 'auto-mode-alist '("\\.js$" . javascript-generic-mode))
       
  1231   )
  1227 
  1232 
  1228 ;;; ----------------------------------------------------------------
  1233 ;;; ----------------------------------------------------------------
  1229 ;;; bat file, batch.
  1234 ;;; bat file, batch.
  1230 
  1235 
  1231 ;; loaded from 'generic-x.el'
  1236 ;; loaded from 'generic-x.el'