summaryrefslogtreecommitdiffstats
path: root/Docs
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2008-03-11 14:54:40 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2008-03-11 14:54:40 (GMT)
commit5d2b90097dda987fafb08f7e97a86cf9fab0225f (patch)
treef77617e07401d0e2b0fcd0941536bd949a858846 /Docs
parentdc9245df6cbe4ed6211387f6090b531ce4414263 (diff)
downloadCMake-5d2b90097dda987fafb08f7e97a86cf9fab0225f.zip
CMake-5d2b90097dda987fafb08f7e97a86cf9fab0225f.tar.gz
CMake-5d2b90097dda987fafb08f7e97a86cf9fab0225f.tar.bz2
ENH: add simple function to convert all CMake commands to lowercase
Diffstat (limited to 'Docs')
-rw-r--r--Docs/cmake-mode.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el
index e582573..624740e 100644
--- a/Docs/cmake-mode.el
+++ b/Docs/cmake-mode.el
@@ -153,6 +153,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.
;;
(defconst cmake-font-lock-keywords