diff options
Diffstat (limited to 'misc/emacs/go-mode-load.el')
-rw-r--r-- | misc/emacs/go-mode-load.el | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/misc/emacs/go-mode-load.el b/misc/emacs/go-mode-load.el index c73156317..0ace46dfa 100644 --- a/misc/emacs/go-mode-load.el +++ b/misc/emacs/go-mode-load.el @@ -18,10 +18,11 @@ ;; (let ((generated-autoload-file buffer-file-name)) (update-file-autoloads "go-mode.el")) -;;;### (autoloads (go-mode) "go-mode" "go-mode.el" (19168 32439)) +;;;### (autoloads (gofmt-before-save gofmt go-mode) "go-mode" "go-mode.el" +;;;;;; (19847 61431)) ;;; Generated autoloads from go-mode.el -(autoload (quote go-mode) "go-mode" "\ +(autoload 'go-mode "go-mode" "\ Major mode for editing Go source text. This provides basic syntax highlighting for keywords, built-ins, @@ -30,7 +31,19 @@ functions, and some types. It also provides indentation that is \(fn)" t nil) -(add-to-list (quote auto-mode-alist) (cons "\\.go$" (function go-mode))) +(add-to-list 'auto-mode-alist (cons "\\.go$" #'go-mode)) + +(autoload 'gofmt "go-mode" "\ +Pipe the current buffer through the external tool `gofmt`. +Replace the current buffer on success; display errors on failure. + +\(fn)" t nil) + +(autoload 'gofmt-before-save "go-mode" "\ +Add this to .emacs to run gofmt on the current buffer when saving: + (add-hook 'before-save-hook #'gofmt-before-save) + +\(fn)" t nil) ;;;*** |