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

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

[nongnu] elpa/go-mode d910a0d 112/495: Make _ a word constituent to acco


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode d910a0d 112/495: Make _ a word constituent to accomodate inferiority of XEmacs
Date: Sat, 7 Aug 2021 09:04:54 -0400 (EDT)

branch: elpa/go-mode
commit d910a0d6b5a5a3c4e4e6b580abf4f14a2ffa6043
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    Make _ a word constituent to accomodate inferiority of XEmacs
---
 go-mode.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index e4ecc88..a49304d 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -24,9 +24,9 @@
     (concat "\\_<" s "\\_>")))
 
 (defconst go-dangling-operators-regexp "[^-]-\\|[^+]\\+\\|[/*&><.=|^]")
-(defconst go-identifier-regexp "[[:word:][:multibyte:]_]+")
+(defconst go-identifier-regexp "[[:word:][:multibyte:]]+")
 (defconst go-label-regexp go-identifier-regexp)
-(defconst go-type-regexp "[[:word:][:multibyte:]_*]+")
+(defconst go-type-regexp "[[:word:][:multibyte:]*]+")
 (defconst go-func-regexp (concat (go--regexp-enclose-in-symbol "func") "\\s 
*\\(" go-identifier-regexp "\\)"))
 (defconst go-func-meth-regexp (concat (go--regexp-enclose-in-symbol "func") 
"\\s *\\(?:(\\s *" go-identifier-regexp "\\s +" go-type-regexp "\\s *)\\s 
*\\)?\\(" go-identifier-regexp "\\)("))
 (defconst go-builtins
@@ -76,7 +76,9 @@
     (modify-syntax-entry ?\' "\"" st)
     (modify-syntax-entry ?`  "\"" st)
     (modify-syntax-entry ?\\ "\\" st)
-    (modify-syntax-entry ?_  "_" st)
+    ;; It would be nicer to have _ as a symbol constituent, but that
+    ;; would trip up XEmacs, which does not support the \_< anchor
+    (modify-syntax-entry ?_  "w" st)
 
     st)
   "Syntax table for Go mode.")



reply via email to

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