summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schutter <t.schutter@comcast.net>2012-09-20 02:33:35 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-09-21 04:28:03 (GMT)
commit6d1e4efd00862f57dd9434ddbf4d5d7c8cb1f24a (patch)
treea4df3b80c5536cf18e5b89cb0746fe097648b5b7
parent7e4a37800cf1901fd73940f06d9d19125fcd767b (diff)
downloadCMake-6d1e4efd00862f57dd9434ddbf4d5d7c8cb1f24a.zip
CMake-6d1e4efd00862f57dd9434ddbf4d5d7c8cb1f24a.tar.gz
CMake-6d1e4efd00862f57dd9434ddbf4d5d7c8cb1f24a.tar.bz2
cmake-mode.el: Use more readable regex and case-fold-search
This reimplement ab9824e. Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
-rw-r--r--Docs/cmake-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el
index 478bc7a..79d2319 100644
--- a/Docs/cmake-mode.el
+++ b/Docs/cmake-mode.el
@@ -68,9 +68,9 @@ set the path with these commands:
"\\|" "[ \t\r\n]"
"\\)*"))
(defconst cmake-regex-block-open
- "^\\([iI][fF]\\|[mM][aA][cC][rR][oO]\\|[fF][oO][rR][eE][aA][cC][hH]\\|[eE][lL][sS][eE]\\|[eE][lL][sS][eE][iI][fF]\\|[wW][hH][iI][lL][eE]\\|[fF][uU][nN][cC][tT][iI][oO][nN]\\)$")
+ "^\\(if\\|macro\\|foreach\\|else\\|elseif\\|while\\|function\\)$")
(defconst cmake-regex-block-close
- "^[ \t]*\\([eE][nN][dD][iI][fF]\\|[eE][nN][dD][fF][oO][rR][eE][aA][cC][hH]\\|[eE][nN][dD][mM][aA][cC][rR][oO]\\|[eE][lL][sS][eE]\\|[eE][lL][sS][eE][iI][fF]\\|[eE][nN][dD][wW][hH][iI][lL][eE]\\|[eE][nN][dD][fF][uU][nN][cC][tT][iI][oO][nN]\\)[ \t]*(")
+ "^[ \t]*\\(endif\\|endforeach\\|endmacro\\|else\\|elseif\\|endwhile\\|endfunction\\)[ \t]*(")
;------------------------------------------------------------------------------
@@ -126,6 +126,7 @@ set the path with these commands:
(beginning-of-line)
(let ((point-start (point))
+ (case-fold-search t) ;; case-insensitive
token)
; Search back for the last indented line.