emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/forth-mode 6f18e1c20e 011/153: Tweak syntax table.


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 6f18e1c20e 011/153: Tweak syntax table.
Date: Sat, 29 Jan 2022 08:02:12 -0500 (EST)

branch: elpa/forth-mode
commit 6f18e1c20e11fd6dc36a7ad8d43917ce50cc3697
Author: Lars Brinkhoff <lars.brinkhoff@delphi.com>
Commit: Lars Brinkhoff <lars.brinkhoff@delphi.com>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]