]> code.delx.au - gnu-emacs/commit
Automatically detect whether .h file is C or C++
authorMichal Nazarewicz <mina86@mina86.com>
Tue, 7 Jun 2016 12:05:36 +0000 (14:05 +0200)
committerMichal Nazarewicz <mina86@mina86.com>
Wed, 15 Jun 2016 16:26:12 +0000 (18:26 +0200)
commit40e0ef481160d0a0b2290d47c012cc50021a8a82
tree4e728d3bdec813b592efa7834f8863d37d4f68b2
parent3be326e8e50e296ebd6ed116b5e5b7b54267b087
Automatically detect whether .h file is C or C++

* lisp/progmodes/cc-mode.el (c-or-c++-mode): A new function which
analyses contents of the buffer to determine whether it looks like C++
source code and based on that enables c-mode or c++-mode.
(c-or-c++-mode--regexp): Regular expression which, when matches
a buffer, signals file is C++.
etc/NEWS
lisp/progmodes/cc-mode.el
test/lisp/progmodes/cc-mode.el [new file with mode: 0644]