Skip to content

Commit 734d523

Browse files
muirdmpsanford
authored andcommitted
Move some defconsts up to fix compiler warnings.
Fixes #352. Closes: #356 [via git-merge-pr]
1 parent e8eea7f commit 734d523

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

go-mode.el

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ constant is changed.")
9191
go-identifier-regexp
9292
"\\)("))
9393

94+
(defconst go--comment-start-regexp "[[:space:]]*\\(?:/[/*]\\)")
95+
(defconst go--case-regexp "\\([[:space:]]*case\\([[:space:]]\\|$\\)\\)")
96+
(defconst go--case-or-default-regexp (concat "\\(" go--case-regexp "\\|" "[[:space:]]*default:\\)"))
97+
9498
(defconst go-builtins
9599
'("append" "cap" "close" "complex" "copy"
96100
"delete" "imag" "len" "make" "new"
@@ -1181,8 +1185,6 @@ Return non-nil if point changed lines."
11811185
(setq count (if (and count (< count 0 )) -1 1)))
11821186
moved))
11831187

1184-
(defconst go--comment-start-regexp "[[:space:]]*\\(?:/[/*]\\)")
1185-
11861188
(defun go--case-comment-p (indent)
11871189
"Return non-nil if looking at a comment attached to a case statement.
11881190
@@ -1238,9 +1240,6 @@ INDENT is the normal indent of this line, i.e. that of the case body."
12381240
;; aligned with "case", leave it that way
12391241
(= (current-indentation) (- indent tab-width)))))))
12401242

1241-
(defconst go--case-regexp "\\([[:space:]]*case\\([[:space:]]\\|$\\)\\)")
1242-
(defconst go--case-or-default-regexp (concat "\\(" go--case-regexp "\\|" "[[:space:]]*default:\\)"))
1243-
12441243
(defun go-mode-indent-line ()
12451244
(interactive)
12461245
(let (indent

0 commit comments

Comments
 (0)