Commit graph

19 commits

Author SHA1 Message Date
Jan Newmarch 350a5ce64f misc/emacs/go-lang.el: Fix restoration of multiple windows in a frame after gofmt
If a frame has multiple windows then the windows must all be restored
after gofmt has finished and the old windows must be restored.
Before this fix, only the Go code edit window would be left.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5280050
2011-10-31 11:33:14 -04:00
Evan Martin 3ac7cae6e8 emacs: add a "godoc" command, like M-x man
This runs godoc and displays its output in a new buffer.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5268041
2011-10-13 09:07:42 -07:00
Russ Cox 305f167b01 misc/emacs: fix indent bug
Must use case-sensitive search to identify keywords.

Fixes #2287.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5182043
2011-10-05 12:27:23 -04:00
Russ Cox 4946b420f2 misc/emacs: refine label detection
Based on idea in
http://patch-tracker.debian.org/patch/series/view/golang/1:59-1/008-emacs-mode-key-literal-indent.patch

Fixes #2174.

R=amdragon, ajmani, amdragon
CC=golang-dev
https://golang.org/cl/4922049
2011-08-24 16:47:12 -04:00
Quan Yong Zhai fc57c4b7a9 misc/emacs: update list of builtins.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4630065
2011-06-24 11:19:48 -07:00
Eric Eisner ed0c0f2c80 misc/emacs: don't select the mark after gofmt
R=ajmani
CC=golang-dev
https://golang.org/cl/4553054
2011-05-23 22:47:25 -04:00
Sameer Ajmani cc5ac676da misc/emacs: bug fix: use UTF-8 when invoking gofmt as a subprocess.
Without this, Unicode characters are stripped out by M-x gofmt.

R=rsc, amdragon
CC=golang-dev
https://golang.org/cl/4523065
2011-05-13 11:05:03 -04:00
Sameer Ajmani 0ac151fd5c misc/emacs: gofmt: don't clobber the current buffer on failure
Change M-x gofmt to display errors in a new buffer instead of
clobbering the current buffer.

Add gofmt-before-save, which runs gofmt when in go-mode.  This
can be used with before-save-hook.  Add to your .emacs:
  (add-hook 'before-save-hook 'gofmt-before-save)

R=rsc, aclements, amdragon
CC=golang-dev
https://golang.org/cl/4276059
2011-03-24 10:35:39 -04:00
Scott Lawrence 3b9a024d29 go-mode.el: Fix highlighting for 'chan' type
Fixes #1038.

R=aclements, rsc
CC=golang-dev
https://golang.org/cl/2111046
2010-09-13 00:12:18 -04:00
Scott Lawrence 87229f54c3 misc/emacs: make _ a word symbol
Fixes #655.

R=rsc, aclements
CC=golang-dev
https://golang.org/cl/1981041
2010-08-26 13:32:50 -04:00
Kevin Ballard ea1a36efcd Fix minor issues with updating go-mode in an empty buffer
Sometimes during editing, when the buffer is emptied (for example,
  as part of a call to M-x gofmt), an error is raised when
  remove-text-properties is called. Ensure that these calls use point-max
  instead of buffer-size to determine their end point.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/189042
2010-01-13 13:32:19 +11:00
Austin Clements 367ae9a541 Use remove-text-properties instead of
remove-list-of-test-properties, since the latter is missing
from XEmacs.

Fixes #462.

R=rsc
CC=golang-dev
https://golang.org/cl/181152
2010-01-06 15:45:43 -08:00
Austin Clements 6712cf365b Update Emacs go-mode for new semicolon rule.
Fixes #415.

R=rsc
CC=golang-dev
https://golang.org/cl/183104
2010-01-05 16:50:36 -08:00
Austin Clements 6e6125ffa4 Make comment-start/-end changes buffer-local instead of global.
Fixes #290.

R=rsc
https://golang.org/cl/160070
2009-11-29 14:22:07 -08:00
James Aguilar 95be81da4d Correct indentation for go-mode where a close brace following a semi-
colon-less statement would be indented one stop too many.

R=rsc, aclements
CC=aclements
https://golang.org/cl/154096
2009-11-13 15:52:30 -08:00
Kevin Ballard 6c2ae1a625 Teach emacs M-x gofmt to save region/restrictions
R=agl, agl1
https://golang.org/cl/152078
2009-11-12 18:40:42 -08:00
Kevin Ballard c57054f7b4 Implement new emacs command M-x gofmt
Define a new interactive function in go-mode.el called gofmt.
This function passes the current buffer through the external `gofmt`
tool and replaces the buffer with the result.

R=agl, rsc
https://golang.org/cl/154044
2009-11-10 20:05:24 -08:00
Kevin Ballard 022e3ae265 Fix go-mode.el to work on empty buffers
Fixes #8.

R=agl, agl1, rsc
https://golang.org/cl/153056
2009-11-10 20:04:14 -08:00
Austin Clements 5bd8c92427 go-mode for Emacs. This provides basic syntax highlighting
for keywords, built-ins, functions, and some types.  It also
provides indentation that is (almost) identical to gofmt.

R=rsc
APPROVED=rsc
DELTA=509  (509 added, 0 deleted, 0 changed)
OCL=35951
CL=35994
2009-10-22 08:54:26 -07:00