branch: elpa/forth-mode
commit 6f18e1c20e11fd6dc36a7ad8d43917ce50cc3697
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Tweak syntax table.
---
forth-mode.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/forth-mode.el b/forth-mode.el
index df08871f05..a5afaf00e6 100644
--- a/forth-mode.el
+++ b/forth-mode.el
@@ -39,8 +39,8 @@
(modify-syntax-entry ?\} ">" table)
(modify-syntax-entry ?\: "(" table)
(modify-syntax-entry ?\; ")" table)
- (modify-syntax-entry ?[ "(" table)
- (modify-syntax-entry ?] ")" table)
+ (modify-syntax-entry ?[ "_" table)
+ (modify-syntax-entry ?] "_" table)
(modify-syntax-entry ?\? "_" table)
(modify-syntax-entry ?! "_" table)
(modify-syntax-entry ?@ "_" table)
@@ -48,12 +48,14 @@
(modify-syntax-entry ?> "_" table)
(modify-syntax-entry ?. "_" table)
(modify-syntax-entry ?, "_" table)
+ (modify-syntax-entry ?' "_" table)
+ (modify-syntax-entry ?" "\"" table)
table))
(defvar forth-mode-hook)
(defvar forth-font-lock-keywords
- '((forth-match-colon-definition 3 font-lock-function-name-face)))
+ '((forth-match-definition 3 font-lock-function-name-face)))
(unless (fboundp 'prog-mode)
(defalias 'prog-mode 'fundamental-mode))
@@ -84,7 +86,7 @@
;;; : ; does> variable constant value
;;; if else then do loop begin while repeat again until postpone
-(defun forth-match-colon-definition (limit)
+(defun forth-match-definition (limit)
(search-forward-regexp
"\\(^\\|\\s-\\)\\(\\S-*:\\|code\\|defer\\|2?variable\\|create\\|2?value\\|2?constant\\)\\s-+\\([[:graph:]]+\\)"
limit t))