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

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

[elpa] externals/csharp-mode fbe090b0e1 2/2: Merge pull request #263 fro


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode fbe090b0e1 2/2: Merge pull request #263 from emacs-csharp/feature/stefan-patch
Date: Wed, 17 Aug 2022 03:57:29 -0400 (EDT)

branch: externals/csharp-mode
commit fbe090b0e16eccdc2ee06da7f2a0b23ad63f3347
Merge: 18fea21c59 2215140a77
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: GitHub <noreply@github.com>

    Merge pull request #263 from emacs-csharp/feature/stefan-patch
    
    Implement patch from Stefan Monnier <monnier@iro.umontreal.ca>
---
 csharp-mode.el | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/csharp-mode.el b/csharp-mode.el
index 74d3bfa01d..281a3cda1e 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1,6 +1,6 @@
 ;;; csharp-mode.el --- C# mode derived mode  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2020-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 ;; Author     : Theodor Thornhill <theo@thornhill.no>
 ;; Maintainer : Jostein Kjønigsen <jostein@gmail.com>
@@ -68,12 +68,16 @@
 (eval-and-compile
   (c-add-language 'csharp-mode 'java-mode))
 
+(defun csharp--make-mode-syntax-table ()
+  (let ((table (make-syntax-table)))
+    (c-populate-syntax-table table)
+    (modify-syntax-entry ?@ "_" table)
+    table))
+(defvar csharp--make-mode-syntax-table #'csharp--make-mode-syntax-table
+  "Workaround for Emacs bug#57065.")
+
 (c-lang-defconst c-make-mode-syntax-table
-  csharp `(lambda ()
-            (let ((table (make-syntax-table)))
-              (c-populate-syntax-table table)
-              (modify-syntax-entry ?@ "_" table)
-              table)))
+  csharp #'csharp--make-mode-syntax-table)
 
 (c-lang-defconst c-identifier-syntax-modifications
   csharp (append '((?@ . "w"))
@@ -563,14 +567,14 @@ compilation and evaluation time conflicts."
 
 (defvar csharp-mode-syntax-table
   (funcall (c-lang-const c-make-mode-syntax-table csharp))
-  "Syntax table used in csharp-mode buffers.")
+  "Syntax table used in `csharp-mode' buffers.")
 
 (defvar csharp-mode-map
   (let ((map (c-make-inherited-keymap)))
     map)
-  "Keymap used in csharp-mode buffers.")
+  "Keymap used in `csharp-mode' buffers.")
 
-(easy-menu-define csharp-mode-menu csharp-mode-map "C# Mode Commands"
+(easy-menu-define csharp-mode-menu csharp-mode-map "C# Mode Commands."
   (cons "C#" (c-lang-const c-mode-menu csharp)))
 
 ;;;###autoload



reply via email to

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