emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 99b06da 408/495: Describe gofmt-args in the readme


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 99b06da 408/495: Describe gofmt-args in the readme and the gofmt docstring (also gofmt-command)
Date: Sat, 7 Aug 2021 09:05:58 -0400 (EDT)

branch: elpa/go-mode
commit 99b06da201afb91e8db0c525c0f3c3590fd92fa6
Author: Simon Frei <freisim93@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>

    Describe gofmt-args in the readme and the gofmt docstring (also 
gofmt-command)
---
 README.md  | 2 ++
 go-mode.el | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index ca26b9c..c138c5f 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,8 @@ the following extra features to provide an improved 
experience:
   buffers before saving them.
   - Setting the `gofmt-command` variable also allows using
     `goimports`.
+  - Setting the `gofmt-args` variable with a list of arguments allows
+    using e.g. `gofmt -s`.
 - Integration with `godoc` via the functions `godoc` and
   `godoc-at-point`.
 - Integration with the Playground
diff --git a/go-mode.el b/go-mode.el
index f20dc1f..cde0b72 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1062,7 +1062,10 @@ with goflymake \(see URL 
`https://github.com/dougm/goflymake'), gocode
   (string-equal (file-name-base gofmt-command) "goimports"))
 
 (defun gofmt ()
-  "Format the current buffer according to the gofmt tool."
+  "Format the current buffer according to the formatting tool.
+
+The tool used can be set via ‘gofmt-command` (default: gofmt) and additional
+arguments can be set as a list via ‘gofmt-args`."
   (interactive)
   (let ((tmpfile (make-temp-file "gofmt" nil ".go"))
         (patchbuf (get-buffer-create "*Gofmt patch*"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]