Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1240)

Issue 154044: Implement new emacs command M-x gofmt (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 4 months ago by eridius
Modified:
14 years, 4 months ago
Reviewers:
agl1, rsc, aclements, agl
Visibility:
Public.

Description

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.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M misc/emacs/go-mode.el View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rsc
LGTM
14 years, 4 months ago (2009-11-11 04:04:55 UTC) #1
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=b51fd2d6c160 *** Implement new emacs command M-x gofmt Define a new interactive ...
14 years, 4 months ago (2009-11-11 04:05:29 UTC) #2
agl1
LGTM
14 years, 4 months ago (2009-11-11 04:06:04 UTC) #3
aclements
14 years, 4 months ago (2009-11-11 04:15:41 UTC) #4
Since this operates on the entire buffer and not just the current narrowing, the
call to shell-command-on-region should preceded with (widen).  Ideally it would
save the restriction and perhaps also the excursion, but shell-command-on-region
deletes the entire region and replaces it, so any saved restrictions or
excursions are lost anyways.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b