diff options
Diffstat (limited to 'misc/emacs')
-rw-r--r-- | misc/emacs/go-mode-load.el | 2 | ||||
-rw-r--r-- | misc/emacs/go-mode.el | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/misc/emacs/go-mode-load.el b/misc/emacs/go-mode-load.el index 0ace46dfa..d453166a4 100644 --- a/misc/emacs/go-mode-load.el +++ b/misc/emacs/go-mode-load.el @@ -19,7 +19,7 @@ ;;;### (autoloads (gofmt-before-save gofmt go-mode) "go-mode" "go-mode.el" -;;;;;; (19847 61431)) +;;;;;; (19917 17808)) ;;; Generated autoloads from go-mode.el (autoload 'go-mode "go-mode" "\ diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el index 692cabfe5..03f0a2a8b 100644 --- a/misc/emacs/go-mode.el +++ b/misc/emacs/go-mode.el @@ -507,7 +507,9 @@ Replace the current buffer on success; display errors on failure." (let ((srcbuf (current-buffer))) (with-temp-buffer (let ((outbuf (current-buffer)) - (errbuf (get-buffer-create "*Gofmt Errors*"))) + (errbuf (get-buffer-create "*Gofmt Errors*")) + (coding-system-for-read 'utf-8) ;; use utf-8 with subprocesses + (coding-system-for-write 'utf-8)) (with-current-buffer errbuf (erase-buffer)) (with-current-buffer srcbuf (save-restriction @@ -521,7 +523,7 @@ Replace the current buffer on success; display errors on failure." (erase-buffer) (insert-buffer-substring outbuf) (goto-char (min old-point (point-max))) - (if old-mark (set-mark (min old-mark (point-max)))) + (if old-mark (push-mark (min old-mark (point-max)) t)) (kill-buffer errbuf)) ;; gofmt failed: display the errors |