branch: elpa/go-mode
commit 734d5232455ffde088021ea5908849ac570e890f
Author: Muir Manders <[email protected]>
Commit: Peter Sanford <[email protected]>
Move some defconsts up to fix compiler warnings.
Fixes #352.
Closes: #356 [via git-merge-pr]
---
go-mode.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index ff39281..6340fa2 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -91,6 +91,10 @@ constant is changed.")
go-identifier-regexp
"\\)("))
+(defconst go--comment-start-regexp "[[:space:]]*\\(?:/[/*]\\)")
+(defconst go--case-regexp "\\([[:space:]]*case\\([[:space:]]\\|$\\)\\)")
+(defconst go--case-or-default-regexp (concat "\\(" go--case-regexp "\\|"
"[[:space:]]*default:\\)"))
+
(defconst go-builtins
'("append" "cap" "close" "complex" "copy"
"delete" "imag" "len" "make" "new"
@@ -1181,8 +1185,6 @@ Return non-nil if point changed lines."
(setq count (if (and count (< count 0 )) -1 1)))
moved))
-(defconst go--comment-start-regexp "[[:space:]]*\\(?:/[/*]\\)")
-
(defun go--case-comment-p (indent)
"Return non-nil if looking at a comment attached to a case statement.
@@ -1238,9 +1240,6 @@ INDENT is the normal indent of this line, i.e. that of
the case body."
;; aligned with "case", leave it that way
(= (current-indentation) (- indent tab-width)))))))
-(defconst go--case-regexp "\\([[:space:]]*case\\([[:space:]]\\|$\\)\\)")
-(defconst go--case-or-default-regexp (concat "\\(" go--case-regexp "\\|"
"[[:space:]]*default:\\)"))
-
(defun go-mode-indent-line ()
(interactive)
(let (indent