Skip to content
Snippets Groups Projects
Commit 7987d985 authored by Roy Crihfield's avatar Roy Crihfield Committed by Brad King
Browse files

cmake-mode.el: Rename function to be consistent

unscreamify-cmake-buffer => cmake-unscreamify-buffer

While at it, wrap the operation in (save-excursion).
parent 63de609e
No related branches found
No related tags found
No related merge requests found
......@@ -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))
)
)
;------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment