mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 07:10:12 -05:00
ENH: add simple function to convert all CMake commands to lowercase
This commit is contained in:
@@ -152,6 +152,26 @@
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
;;
|
||||
;; Helper functions for buffer
|
||||
;;
|
||||
(defun unscreamify-cmake-buffer ()
|
||||
"Convert all CMake commands to lowercase in buffer."
|
||||
(interactive)
|
||||
(setq save-point (point))
|
||||
(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))
|
||||
(goto-char save-point)
|
||||
)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
;;
|
||||
;; Keyword highlighting regex-to-face map.
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user