BUG: fix highlight for comments in multiple buffers

This commit is contained in:
Bill Hoffman 2003-06-20 14:10:21 -04:00
parent 454c7ad2b6
commit bf59bd2706
1 changed files with 10 additions and 15 deletions

View File

@ -139,21 +139,16 @@
(kill-all-local-variables)
(setq major-mode 'cmake-mode)
(setq mode-name "CMAKE")
; Create the syntax table if it doesn't exist.
(if (not cmake-mode-syntax-table)
(progn
(setq cmake-mode-syntax-table (make-syntax-table))
(set-syntax-table cmake-mode-syntax-table)
; Define comment syntax.
(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)
(modify-syntax-entry ?\n ">" cmake-mode-syntax-table)
)
)
; 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)
(modify-syntax-entry ?\n ">" cmake-mode-syntax-table)
; Setup font-lock mode.
(make-local-variable 'font-lock-defaults)