summaryrefslogtreecommitdiff
path: root/misc/emacs
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-09-13 12:00:31 +0200
committerOndřej Surý <ondrej@sury.org>2011-09-13 12:00:31 +0200
commit04f99b387021a8ce32a8795360cba9beaf986a81 (patch)
treef806c632c5dec5bb83190946d6d8ff8bd33c0e57 /misc/emacs
parentd9514677ddaa705852cbba5034cb6d284261b53a (diff)
downloadgolang-04f99b387021a8ce32a8795360cba9beaf986a81.tar.gz
Imported Upstream version 2011.09.07upstream-weekly/2011.09.07
Diffstat (limited to 'misc/emacs')
-rw-r--r--misc/emacs/go-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el
index ba7f72397..1c90af865 100644
--- a/misc/emacs/go-mode.el
+++ b/misc/emacs/go-mode.el
@@ -7,7 +7,6 @@
;;; To do:
;; * Indentation is *almost* identical to gofmt
-;; ** We think struct literal keys are labels and outdent them
;; ** We disagree on the indentation of function literals in arguments
;; ** There are bugs with the close brace of struct literals
;; * Highlight identifiers according to their syntactic context: type,
@@ -401,7 +400,8 @@ indented one level."
(setq first nil))))
;; case, default, and labels are outdented 1 level
- (when (looking-at "\\<case\\>\\|\\<default\\>\\|\\w+\\s *:\\(\\S.\\|$\\)")
+ ;; assume that labels are alone on the line
+ (when (looking-at "\\<case\\>\\|\\<default\\>\\|\\w+\\s *:\\s *$")
(decf indent tab-width))
;; Continuation lines are indented 1 level