# HG changeset patch # User Oleksandr Gavenko # Date 1288296531 -10800 # Node ID 6662cd4e7a05ff628f26c5afc8c9e3ea2a163c08 # Parent 01ea09b00f76c9ed7e4f53d3d10bf431b212bad7# Parent eb7d261fa5399e19528aecfcc7cb5754b39f0c68 Automated merge with file:///cygdrive/e/srv/hg/dot-emacs diff -r eb7d261fa539 -r 6662cd4e7a05 .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 "\\_" 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.