summaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorRoy Crihfield <rscrihf@gmail.com>2015-03-06 15:08:12 -0500
committerBrad King <brad.king@kitware.com>2015-07-27 09:39:42 -0400
commit7987d9857e581b5266d98d79aa71a8f45611f203 (patch)
tree2dc51e6869e159e18ca044497554d48e81bf2eca /Auxiliary
parent63de609ef147e665ebd8d7622f580a74a417287b (diff)
downloadcmake-7987d9857e581b5266d98d79aa71a8f45611f203.tar.gz
cmake-mode.el: Rename function to be consistent
unscreamify-cmake-buffer => cmake-unscreamify-buffer While at it, wrap the operation in (save-excursion).
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/cmake-mode.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index fe4a4c65ab..ea2415ddb0 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -172,17 +172,19 @@ the indentation. Otherwise it retains the same position on the line"
;;
;; Helper functions for buffer
;;
-(defun unscreamify-cmake-buffer ()
+(defun cmake-unscreamify-buffer ()
"Convert all CMake commands to lowercase in buffer."
(interactive)
- (goto-char (point-min))
- (while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
- (replace-match
- (concat
- (match-string 1)
- (downcase (match-string 2))
- (match-string 3))
- t))
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
+ (replace-match
+ (concat
+ (match-string 1)
+ (downcase (match-string 2))
+ (match-string 3))
+ t))
+ )
)
;------------------------------------------------------------------------------