How to tell emacs to open .h file in C++ mode?

后端 未结 6 1633
暗喜
暗喜 2020-11-29 03:28

What lines should I add to my _emacs (on Windows) file to have it open .h files in C++ mode? The default is C mode.

6条回答
  •  孤城傲影
    2020-11-29 03:55

    I could swear I saw this question answered appropriately already? Weird.

    You want this:

    (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
    

提交回复
热议问题