]> git.eshelyaron.com Git - emacs.git/commit
Extend go-ts-mode with command to add docstring to function
authorEvgeni Kolev <evgenysw@gmail.com>
Sat, 14 Jan 2023 06:28:06 +0000 (08:28 +0200)
committerTheodor Thornhill <theo@thornhill.no>
Sat, 21 Jan 2023 20:25:46 +0000 (21:25 +0100)
commitf0971f94fe42224b4d85bb8b6188d5d805689ddf
treeab2441ed0dc49b9210878cb043631d8b4cc155db
parentcb07f1bcd0f3a1af58f8d4d65d96949e20dfa569
Extend go-ts-mode with command to add docstring to function

go-ts-mode is extended with command go-ts-mode-docstring which adds
docstring comment to the defun at point. If a comment already exists,
the point is instead moved to the top-most comment line. The command
is bound to "C-c C-d".

* lisp/progmodes/go-ts-mode.el (go-ts-mode): Extend docstring.
(go-ts-mode-docstring): New function.
(go-ts-mode--comment-on-previous-line-p): New function.
(go-ts-mode-map): New map variable.
* etc/NEWS: Mention the change.

(bug#60805)
etc/NEWS
lisp/progmodes/go-ts-mode.el