Mercurial > hg > octave-terminal
changeset 13105:3d7a4a2d9cef
Make .h files open in c++-mode in Emacs; make sure gnu style is set for C mode
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 06 Sep 2011 12:48:40 -0500 |
parents | 3b5449493bb8 |
children | 353c71c76f22 |
files | .dir-locals.el |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,5 +1,9 @@ -((nil . ((indent-tabs-mode . nil) - (fill-column . 72))) - (c-default-mode "gnu") +((nil . + ((c-file-style . "gnu") + (indent-tabs-mode . nil) + (fill-column . 72) + (eval . (when (string-match "\\.h\\'" (buffer-file-name)) + (c++-mode) + (c-set-style "gnu"))))) (change-log-mode . ((indent-tabs-mode . t))) (makefile-mode . ((indent-tabs-mode . t))))