When I attempt to byte compile csharp-mode under Emacs 24.2.1, I am getting the following error:
csharp-mode.el:2028:1:Error: Symbol's value as variable is void: csharp-enum-decl-re
This post confirms this same compilation problem and offers the following remedy:
I tried manually defining csharp-enum-decl-re by doing C-x C-e on the defconst; this got it to compile.
This remedy worked for me as well! However, this remedy leaves me with a couple of questions:
- Without pre-defining
csharp-enum-decl-re, why does csharp-mode.el fail to byte-compile? (See the first link for the source code for csharp-mode.el.) - Without modifying csharp-mode.el, is there a better workaround for this compilation problem?
- The error indicated at line 2028 concerns the following definition. Where is the dependency on
csharp-enum-decl-re?
(defconst csharp-font-lock-keywords-2 (c-lang-const c-matchers-2 csharp)
"Fast normal highlighting for C# mode.")