|
1 | 1 | ;;; csharp-mode.el --- C# mode derived mode -*- lexical-binding: t; -*- |
2 | 2 |
|
3 | | -;; Copyright (C) 2020-2021 Free Software Foundation, Inc. |
| 3 | +;; Copyright (C) 2020-2022 Free Software Foundation, Inc. |
4 | 4 |
|
5 | 5 | ;; Author : Theodor Thornhill <theo@thornhill.no> |
6 | 6 | ;; Maintainer : Jostein Kjønigsen <jostein@gmail.com> |
|
68 | 68 | (eval-and-compile |
69 | 69 | (c-add-language 'csharp-mode 'java-mode)) |
70 | 70 |
|
| 71 | +(defun csharp--make-mode-syntax-table () |
| 72 | + (let ((table (make-syntax-table))) |
| 73 | + (c-populate-syntax-table table) |
| 74 | + (modify-syntax-entry ?@ "_" table) |
| 75 | + table)) |
| 76 | +(defvar csharp--make-mode-syntax-table #'csharp--make-mode-syntax-table |
| 77 | + "Workaround for Emacs bug#57065.") |
| 78 | + |
71 | 79 | (c-lang-defconst c-make-mode-syntax-table |
72 | | - csharp `(lambda () |
73 | | - (let ((table (make-syntax-table))) |
74 | | - (c-populate-syntax-table table) |
75 | | - (modify-syntax-entry ?@ "_" table) |
76 | | - table))) |
| 80 | + csharp #'csharp--make-mode-syntax-table) |
77 | 81 |
|
78 | 82 | (c-lang-defconst c-identifier-syntax-modifications |
79 | 83 | csharp (append '((?@ . "w")) |
@@ -563,14 +567,14 @@ compilation and evaluation time conflicts." |
563 | 567 |
|
564 | 568 | (defvar csharp-mode-syntax-table |
565 | 569 | (funcall (c-lang-const c-make-mode-syntax-table csharp)) |
566 | | - "Syntax table used in csharp-mode buffers.") |
| 570 | + "Syntax table used in `csharp-mode' buffers.") |
567 | 571 |
|
568 | 572 | (defvar csharp-mode-map |
569 | 573 | (let ((map (c-make-inherited-keymap))) |
570 | 574 | map) |
571 | | - "Keymap used in csharp-mode buffers.") |
| 575 | + "Keymap used in `csharp-mode' buffers.") |
572 | 576 |
|
573 | | -(easy-menu-define csharp-mode-menu csharp-mode-map "C# Mode Commands" |
| 577 | +(easy-menu-define csharp-mode-menu csharp-mode-map "C# Mode Commands." |
574 | 578 | (cons "C#" (c-lang-const c-mode-menu csharp))) |
575 | 579 |
|
576 | 580 | ;;;###autoload |
|
0 commit comments