From 27e9297a13437c88f5c0c037b998e28a730e2d98 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 5 Sep 2011 21:51:50 +0200 Subject: [PATCH] EMACS: updated go-mode --- .emacs.d/elisp/go-mode.el | 8 ++++---- 1 file 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 "\\\\|\\\\|\\w+\\s *:\\(\\S.\\|$\\)") + ;; assume that labels are alone on the line + (when (looking-at "\\\\|\\\\|\\w+\\s *:\\s *$") (decf indent tab-width)) ;; Continuation lines are indented 1 level