diff -r 3f8ba1f0e12a -r 01ea09b00f76 .emacs-my --- a/.emacs-my Fri Oct 15 18:02:18 2010 +0300 +++ b/.emacs-my Thu Oct 21 16:33:32 2010 +0300 @@ -978,6 +978,18 @@ (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$" + (or (buffer-file-name) + (buffer-name))) + (save-excursion + (re-search-forward "\\_" nil t)))) + +(add-to-list 'magic-mode-alist + '(my-c++-header-file-p . c++-mode)) + + (setq-default comment-style (quote indent)) (setq-default comment-column 44) (setq-default comment-fill-column my-fill-column) @@ -1235,16 +1247,6 @@ ;;; ---------------------------------------------------------------- ;;; java. -;; If you want Emacs to defer loading the JDE until you open a Java file, edit -;; the following line: - -;; (setq defer-loading-jde t) -;; (if defer-loading-jde -;; (progn -;; (autoload 'jde-mode "jde" "JDE mode." t) -;; (add-to-list 'auto-mode-alist '("\\.java\\'" . jde-mode)) -;; (require 'jde))) - ;;; ---------------------------------------------------------------- ;;; ECB.