[Cmake-commits] [cmake-commits] barre committed cmake-mode.el 1.32 1.33

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Mar 11 10:54:42 EDT 2008


Update of /cvsroot/CMake/CMake/Docs
In directory public:/mounts/ram/cvs-serv20289

Modified Files:
	cmake-mode.el 
Log Message:
ENH: add simple function to convert all CMake commands to lowercase


Index: cmake-mode.el
===================================================================
RCS file: /cvsroot/CMake/CMake/Docs/cmake-mode.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -C 2 -d -r1.32 -r1.33
*** cmake-mode.el	2 Jan 2008 22:32:58 -0000	1.32
--- cmake-mode.el	11 Mar 2008 14:54:40 -0000	1.33
***************
*** 154,157 ****
--- 154,177 ----
  
  ;;
+ ;; 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.
  ;;



More information about the Cmake-commits mailing list