Skip to content
Snippets Groups Projects
Commit 30f14aeb authored by Syohei YOSHIDA's avatar Syohei YOSHIDA Committed by Brad King
Browse files

cmake-mode.el: syntax of '_' should be treated as symbol


Word commands, such as foward-word(M-f), backward-kill-word(M-backspace),
don't work well like other major-modes if syntax of '_' is treated as "word".

Tested-by: default avatarGuillaume Papin <guillaume.papin@parrot.com>
parent addff66d
No related branches found
No related tags found
No related merge requests found
......@@ -202,7 +202,7 @@ the indentation. Otherwise it retains the same position on the line"
;; Keyword highlighting regex-to-face map.
;;
(defconst cmake-font-lock-keywords
(list '("^[ \t]*\\(\\w+\\)[ \t]*(" 1 font-lock-function-name-face))
(list '("^[ \t]*\\([[:word:]_]+\\)[ \t]*(" 1 font-lock-function-name-face))
"Highlighting expressions for CMAKE mode."
)
......@@ -241,7 +241,6 @@ the indentation. Otherwise it retains the same position on the line"
; Create the syntax table
(setq cmake-mode-syntax-table (make-syntax-table))
(set-syntax-table cmake-mode-syntax-table)
(modify-syntax-entry ?_ "w" cmake-mode-syntax-table)
(modify-syntax-entry ?\( "()" cmake-mode-syntax-table)
(modify-syntax-entry ?\) ")(" cmake-mode-syntax-table)
(modify-syntax-entry ?# "<" cmake-mode-syntax-table)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment