MantisBT - CMake
View Issue Details
0015521CMakeCMakepublic2015-04-18 06:282016-01-04 11:51
Jostein Kjønigsen 
Brad King 
normalminoralways
closedfixed 
EmacsN/AN/A
CMake 3.2.2 
CMake 3.4CMake 3.4 
0015521: cmake-mode.el does not derive from prog-mode.
This means that lots of generic prog-mode hooks (like `projectile-mode` and similar) won't get activated without adding a workaround like the following to your `.emacs`-file:

````elisp
(add-hook 'cmake-mode-hook 'your-prog-mode-hook)
````

Not the end of the world, but definitely annoying.
1. Install emacs
2. Create a prog-mode hook according to your specifications
3. Install cmake-mode in emacs
4. Open cmake-file

5. Observe that cmake-mode-hook has been invoked, but not any prog-mode hooks. Surely cmake is a programming-related mode?
A solution to this problem has been implemented in a fork found on Github:

https://github.com/roysc/cmake-mode/blob/master/cmake-mode.el#L247-L249 [^]
No tags attached.
Issue History
2015-04-18 06:28Jostein KjønigsenNew Issue
2015-04-20 09:58Brad KingNote Added: 0038546
2015-06-23 04:16Jostein KjønigsenNote Added: 0038960
2015-06-23 08:54Brad KingNote Added: 0038961
2015-06-23 08:55Brad KingAssigned To => Brad King
2015-06-23 08:55Brad KingStatusnew => resolved
2015-06-23 08:55Brad KingResolutionopen => fixed
2015-06-23 08:55Brad KingFixed in Version => CMake 3.4
2015-06-23 08:55Brad KingTarget Version => CMake 3.4
2016-01-04 11:51Robert MaynardNote Added: 0040085
2016-01-04 11:51Robert MaynardStatusresolved => closed

Notes
(0038546)
Brad King   
2015-04-20 09:58   
The change was submitted as a PR here:

 https://github.com/Kitware/CMake/pull/146 [^]

though the preferred contribution method is described in CONTRIBUTING.rst.

It was closed there waiting for the submitter to make additional revisions.
(0038960)
Jostein Kjønigsen   
2015-06-23 04:16   
Thanks for pointing out the former pull request. I can see why that one was abandoned.

Please consider my much simpler and less invasive pull request here:

https://github.com/Kitware/CMake/pull/160 [^]

That should conclude this issue. Sorry for stalling on this one.
(0038961)
Brad King   
2015-06-23 08:54   
Re 0015521:0038960: Thanks. I've applied the change with updates to the commit message:

 cmake-mode.el: Add support for prog-mode hooks
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b24b58bb [^]

I'll reference this and close the PR shortly.
(0040085)
Robert Maynard   
2016-01-04 11:51   
Closing resolved issues that have not been updated in more than 4 months.