Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
44a3a58e
Commit
44a3a58e
authored
Jun 13, 2012
by
Jean-Marc Eurin
Committed by
Sameer Ajmani
Jun 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc/emacs: Fix a failure when /tmp/<file>.go exists.
R=sameer CC=golang-dev
https://golang.org/cl/6296060
parent
bb3af755
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
misc/emacs/go-mode.el
misc/emacs/go-mode.el
+3
-6
No files found.
misc/emacs/go-mode.el
View file @
44a3a58e
...
...
@@ -817,13 +817,10 @@ Replace the current buffer on success; display errors on failure."
(
defun
gofmt-apply-patch
(
filename
srcbuf
patchbuf
)
(
require
'diff-mode
)
;; apply all the patch hunks
and restore the mark and point
;; apply all the patch hunks
(
with-current-buffer
patchbuf
(
let
((
filename
(
file-name-nondirectory
filename
))
(
min
(
point-min
)))
(
replace-string
gofmt-stdin-tag
filename
nil
min
(
point-max
))
(
replace-regexp
"^--- /tmp/gofmt[0-9]*"
(
concat
"--- /tmp/"
filename
)
nil
min
(
point-max
)))
(
replace-regexp
"^--- /tmp/gofmt[0-9]*"
(
concat
"--- "
filename
)
nil
(
point-min
)
(
point-max
))
(
condition-case
nil
(
while
t
(
diff-hunk-next
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment