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).
This commit is contained in:
Kevin Burge 2015-10-08 12:49:00 -05:00 committed by Brad King
parent 679a5d2185
commit a935745d07
1 changed files with 4 additions and 4 deletions

View File

@ -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))))