MantisBT - CMake
View Issue Details
0013548CMakeDocumentationpublic2012-09-18 23:572013-04-23 04:14
tschutter 
Eric NOULARD 
normalminorN/A
closedfixed 
all
CMake 2.8.9 
CMake 2.8.10CMake 2.8.10 
0013548: Updated cmake-mode.el
I have updated the cmake-mode.el file available at http://www.cmake.org/CMakeDocs/cmake-mode.el [^] to include a keymap. This allows the user to define keys that only apply to cmake-mode. For example, you can now get help on a command by typing "C-c h" instead of "C-x cmake-help-command".

I have attached the updated cmake-mode.el
No tags attached.
related to 0014108closed Kitware Robot add test to cover assumption of the cmake --help-command output 
child of 0013664closed Kitware Robot Emacs integration should be easier 
? cmake-mode.el (11,597) 2012-09-18 23:57
https://public.kitware.com/Bug/file/4485/cmake-mode.el
patch 0001-cmake-mode.el-reimplement-ab9824e-using-more-readabl.patch (1,671) 2012-09-19 22:51
https://public.kitware.com/Bug/file/4489/0001-cmake-mode.el-reimplement-ab9824e-using-more-readabl.patch
patch 0002-cmake-mode.el-add-keybindings.patch (1,483) 2012-09-19 22:51
https://public.kitware.com/Bug/file/4490/0002-cmake-mode.el-add-keybindings.patch
Issue History
2012-09-18 23:57tschutterNew Issue
2012-09-18 23:57tschutterFile Added: cmake-mode.el
2012-09-19 04:54Eric NOULARDAssigned To => Eric NOULARD
2012-09-19 04:54Eric NOULARDStatusnew => assigned
2012-09-19 04:59Eric NOULARDNote Added: 0031055
2012-09-19 05:12Eric NOULARDNote Added: 0031056
2012-09-19 09:41tschutterNote Added: 0031059
2012-09-19 10:06tschutterNote Added: 0031060
2012-09-19 10:34Eric NOULARDNote Added: 0031061
2012-09-19 10:36Eric NOULARDNote Added: 0031062
2012-09-19 22:51tschutterFile Added: 0001-cmake-mode.el-reimplement-ab9824e-using-more-readabl.patch
2012-09-19 22:51tschutterFile Added: 0002-cmake-mode.el-add-keybindings.patch
2012-09-19 22:53tschutterNote Added: 0031069
2012-09-21 00:32Eric NOULARDPlatform => all
2012-09-21 00:32Eric NOULARDProduct Version => CMake 2.8.9
2012-09-21 00:32Eric NOULARDTarget Version => CMake 2.8.10
2012-09-21 00:34Eric NOULARDNote Added: 0031077
2012-09-21 00:34Eric NOULARDStatusassigned => resolved
2012-09-21 00:34Eric NOULARDFixed in Version => CMake 2.8.10
2012-09-21 00:34Eric NOULARDResolutionopen => fixed
2013-03-04 08:38Robert MaynardNote Added: 0032455
2013-03-04 08:38Robert MaynardStatusresolved => closed
2013-04-23 04:13Eric NOULARDRelationship addedrelated to 0014108
2013-04-23 04:14Eric NOULARDRelationship addedchild of 0013664

Notes
(0031055)
Eric NOULARD   
2012-09-19 04:59   
I'm currently reviewing the patch.
(0031056)
Eric NOULARD   
2012-09-19 05:12   
The feature is nice but why did you change

cmake-regex-block-open/close from possibly mixed case to upper case?

I'm not an emacs mode expert so, wouldn't this prevent
correct indentation when open/close block are lower case?

I ask that because from my testing it seems to work with upper and lower
case with the new cmake-mode.el file but I don't quite understand why...
(0031059)
tschutter   
2012-09-19 09:41   
I made no such change to cmake-regex-block-open/close. The version of cmake-mode.el that you are looking at must be different than the one available at http://www.cmake.org/CMakeDocs/cmake-mode.el, [^] which was my starting point.

But you have identified an actual bug. `cmake-regex-block-open' is passed to the string-match function. The string-match function ignores case if `case-fold-search' is non-nil. The default for `case-fold-search' is t. But `case-fold-search' can be modified by the user.

Hold until I can modify cmake-mode.el, test, and attach a new version.
(0031060)
tschutter   
2012-09-19 10:06   
Eric, can you provide to me the original version of cmake-mode.el that you were comparing against? That way I can make sure to incorporate any changes that it has.
(0031061)
Eric NOULARD   
2012-09-19 10:34   
Most up to date version may be found in CMake git repo:

http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Docs/cmake-mode.el;hb=HEAD [^]
(0031062)
Eric NOULARD   
2012-09-19 10:36   
If you know git you can clone the CMake git repo
http://www.cmake.org/Wiki/CMake/Git [^]

and provide a patch,
you can use
git format-patch HEAD~1

if your change is contained in a single local commit.
(0031069)
tschutter   
2012-09-19 22:53   
I have attached two patches.

The first patch reimplements ab9824e using more readable regexes and the case-fold-search function.

The second patch adds the keymap.
(0031077)
Eric NOULARD   
2012-09-21 00:34   
Thanks a lot.
I just committed you patch to next. I did a small edit of the commit log
message because it was reject by commit hook (no more than 78 characters
for the first comment line)

Merge topic 'UpdateEmacsMode-bug0013548' into next

301e67e cmake-mode.el: add local keybindings
6d1e4ef cmake-mode.el: Use more readable regex and case-fold-search

Should be on master on next tuesday unless someone discover something
wrong with this in the meantime.

Thank you for your contribution.
(0032455)
Robert Maynard   
2013-03-04 08:38   
Closing resolved issues that have not been updated in more than 4 months.