summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Burge <kevin.burge@systemware.com>2015-10-08 12:49:00 -0500
committerBrad King <brad.king@kitware.com>2015-10-08 14:21:20 -0400
commita935745d0730cf1cd6c1a880d71e36a39ad86f8c (patch)
treea1bc82c862d39677ddb9aa74769cde6929bbd1b9
parent679a5d2185b15dcd0ff73f7c1c2d7d527c53de53 (diff)
downloadcmake-a935745d0730cf1cd6c1a880d71e36a39ad86f8c.tar.gz
cmake-mode.el: treat keywords as symbols
Symbols such as "CHECK_FUNCTION_EXISTS" should not trigger an open block (due to containing the "word" FUNCTION). Fix this regression caused by commit v3.4.0-rc1~292^2~3 (cmake-mode.el: Use `rx' for regexps, 2015-07-23).
-rw-r--r--Auxiliary/cmake-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index 11e33b378f..e50ae7b957 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -70,11 +70,11 @@ set the path with these commands:
(defconst cmake-regex-indented
(rx-to-string `(and bol (* (group (or (regexp ,cmake-regex-token) (any space ?\n)))))))
(defconst cmake-regex-block-open
- (rx-to-string `(and bow (or ,@(append cmake-keywords-block-open
- (mapcar 'downcase cmake-keywords-block-open))) eow)))
+ (rx-to-string `(and symbol-start (or ,@(append cmake-keywords-block-open
+ (mapcar 'downcase cmake-keywords-block-open))) symbol-end)))
(defconst cmake-regex-block-close
- (rx-to-string `(and bow (or ,@(append cmake-keywords-block-close
- (mapcar 'downcase cmake-keywords-block-close))) eow)))
+ (rx-to-string `(and symbol-start (or ,@(append cmake-keywords-block-close
+ (mapcar 'downcase cmake-keywords-block-close))) symbol-end)))
(defconst cmake-regex-close
(rx-to-string `(and bol (* space) (regexp ,cmake-regex-block-close)
(* space) (regexp ,cmake-regex-paren-left))))