summaryrefslogtreecommitdiffstats
path: root/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-09-05 21:51:50 +0200
committerGravatar Tom Willemsen2011-09-05 21:51:50 +0200
commit27e9297a13437c88f5c0c037b998e28a730e2d98 (patch)
treeef10a314722e28d748fa13caa8a33af581d7f079 /.emacs.d
parent61953915a238838a40b95b63186caaaa6f726aaf (diff)
downloaddotfiles-27e9297a13437c88f5c0c037b998e28a730e2d98.tar.gz
dotfiles-27e9297a13437c88f5c0c037b998e28a730e2d98.zip
EMACS: updated go-mode
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/elisp/go-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/.emacs.d/elisp/go-mode.el b/.emacs.d/elisp/go-mode.el
index 059f783..0551a06 100644
--- a/.emacs.d/elisp/go-mode.el
+++ b/.emacs.d/elisp/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,
@@ -69,8 +68,8 @@
some syntax analysis.")
(defvar go-mode-font-lock-keywords
- (let ((builtins '("cap" "close" "closed" "len" "make" "new"
- "panic" "panicln" "print" "println"))
+ (let ((builtins '("append" "cap" "close" "complex" "copy" "imag" "len"
+ "make" "new" "panic" "print" "println" "real" "recover"))
(constants '("nil" "true" "false" "iota"))
(type-name "\\s *\\(?:[*(]\\s *\\)*\\(?:\\w+\\s *\\.\\s *\\)?\\(\\w+\\)")
)
@@ -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