Automated merge with file:///cygdrive/e/srv/hg/dot-emacs
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 28 Oct 2010 23:08:51 +0300
changeset 506 6662cd4e7a05
parent 501 01ea09b00f76 (diff)
parent 505 eb7d261fa539 (current diff)
child 507 58e5a1067495
child 509 ed5ef1f0855f
Automated merge with file:///cygdrive/e/srv/hg/dot-emacs
.emacs-my
--- a/.emacs-my	Thu Oct 28 23:01:59 2010 +0300
+++ b/.emacs-my	Thu Oct 28 23:08:51 2010 +0300
@@ -977,6 +977,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)
@@ -1234,16 +1246,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.