branch: externals/csharp-mode commit 9c42dac225f138078d96896a11fd616dab5ebf3a Author: Jostein Kjønigsen <jost...@kjonigsen.net> Commit: Jostein Kjønigsen <jost...@kjonigsen.net>
Move all defcustoms to the top. Removes compiler warning about undefined variables. Addresses https://github.com/josteink/csharp-mode/issues/79 --- csharp-mode.el | 54 +++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/csharp-mode.el b/csharp-mode.el index 617ec12..4ad7a82 100644 --- a/csharp-mode.el +++ b/csharp-mode.el @@ -354,6 +354,35 @@ +;; Custom variables +;; ensure all are defined before using ...; + +(defcustom csharp-mode-hook nil + "*Hook called by `csharp-mode'." + :type 'hook + :group 'csharp) + +;; The following fn allows this: +;; (csharp-log 3 "scan result...'%s'" state) + +(defcustom csharp-log-level 0 + "The current log level for CSharp-mode-specific operations. +This is used in particular by the verbatim-literal +string scanning. + +Most other csharp functions are not instrumented. +0 = NONE, 1 = Info, 2 = VERBOSE, 3 = DEBUG, 4 = SHUTUP ALREADY. " + :type 'integer + :group 'csharp) + + +(defcustom csharp-want-imenu t + "*Whether to generate a buffer index via imenu for C# buffers." + :type 'boolean :group 'csharp) + + + + ;; These are only required at compile time to get the sources for the ;; language constants. (The load of cc-fonts and the font-lock @@ -1376,31 +1405,6 @@ This regexp is assumed to not match any non-operator identifier." -;; Custom variables -(defcustom csharp-mode-hook nil - "*Hook called by `csharp-mode'." - :type 'hook - :group 'csharp) - -;; The following fn allows this: -;; (csharp-log 3 "scan result...'%s'" state) - -(defcustom csharp-log-level 0 - "The current log level for CSharp-mode-specific operations. -This is used in particular by the verbatim-literal -string scanning. - -Most other csharp functions are not instrumented. -0 = NONE, 1 = Info, 2 = VERBOSE, 3 = DEBUG, 4 = SHUTUP ALREADY. " - :type 'integer - :group 'csharp) - - -(defcustom csharp-want-imenu t - "*Whether to generate a buffer index via imenu for C# buffers." - :type 'boolean :group 'csharp) - - (defconst csharp-font-lock-keywords-1 (c-lang-const c-matchers-1 csharp) "Minimal highlighting for C# mode.")