开发者

Is it possible to more nicely format the help for a function?

When I use describe-function, I get the documentation text displayed in a Help buffer.

If the doc is long enough, it will w开发者_运维问答rap in the buffer, but it doesn't wrap nicely. like this:

Is it possible to more nicely format the help for a function?

I can make the docstring use 72-character lines, but that supposes that the window will be 80 characters, which is not always the case.

Is it possible to get describe-function to emit documentation in a more nicely formatted way?


Try enabling global-visual-line-mode to get nice text wrapping in all your buffers. It works in code and help buffers, but doesn't mess up your line numbering! Of all the line wrapping modes for emacs, I find it to be the best. If you don't want to use it globally, simply try M-x visual-line-mode.


No, please do not "try enabling global-visual-line-mode" as your solution for this.

Just try adopting the Emacs conventions for doc strings. See the Elisp manual, node Documentation Tips (aka "Tips for Documentation Strings").

In general, doc strings should not have lines wider than 60 chars.

Remember that there are multiple places where Emacs uses doc strings, including for apropos. Emacs expects doc strings to follow the documented conventions, for best results.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜