diff -r 1848e3b1fc00 -r c3390bcde246 .emacs-my --- a/.emacs-my Tue Oct 12 15:05:33 2010 +0300 +++ b/.emacs-my Thu Oct 21 16:05:39 2010 +0300 @@ -980,6 +980,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)