cmake-mode.el: Rename function to be consistent
unscreamify-cmake-buffer => cmake-unscreamify-buffer While at it, wrap the operation in (save-excursion).
This commit is contained in:
parent
63de609ef1
commit
7987d9857e
|
@ -172,17 +172,19 @@ the indentation. Otherwise it retains the same position on the line"
|
||||||
;;
|
;;
|
||||||
;; Helper functions for buffer
|
;; Helper functions for buffer
|
||||||
;;
|
;;
|
||||||
(defun unscreamify-cmake-buffer ()
|
(defun cmake-unscreamify-buffer ()
|
||||||
"Convert all CMake commands to lowercase in buffer."
|
"Convert all CMake commands to lowercase in buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(goto-char (point-min))
|
(save-excursion
|
||||||
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
|
(goto-char (point-min))
|
||||||
(replace-match
|
(while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t)
|
||||||
(concat
|
(replace-match
|
||||||
(match-string 1)
|
(concat
|
||||||
(downcase (match-string 2))
|
(match-string 1)
|
||||||
(match-string 3))
|
(downcase (match-string 2))
|
||||||
t))
|
(match-string 3))
|
||||||
|
t))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue