Automated merge with file:///cygdrive/d/srv/hg-home/dot-emacs
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 21 Oct 2010 16:33:32 +0300
changeset 501 01ea09b00f76
parent 498 3f8ba1f0e12a (current diff)
parent 500 1f8c3b0b0ca3 (diff)
child 502 64a475fa36e2
child 506 6662cd4e7a05
Automated merge with file:///cygdrive/d/srv/hg-home/dot-emacs
.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 "\\_<class\\_>" 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.