Commit b175798
committed
Add function to apply
This commit adds a function that helps one to keep documentation strings
under `fill-column` columns.
For example, consider the following doc strings:
```elixir
@moduledoc """
This is module documentation with a line that is waaaaayyy to long to be read. It's pretty bad when lines get wrapped in your editor or when you have to scroll horizontally to be able to see it well. Gosh, can Emacs relieve me of the pain of keeping documentation columns straight??
"""
@doc """
This is module documentation with a line that is waaaaayyy to long to be read. It's pretty bad when lines get wrapped in your editor or when you have to scroll horizontally to be able to see it well. Gosh, can Emacs relieve me of the pain of keeping documentation columns straight??
"""
```
After calling `elixir-mode-fill-doc-string` the result would be:
```elixir
@moduledoc """
This is module documentation with a line that is waaaaayyy to long to be read.
It's pretty bad when lines get wrapped in your editor or when you have to
scroll horizontally to be able to see it well. Gosh, can Emacs relieve me of
the pain of keeping documentation columns straight??
"""
@doc """
This is module documentation with a line that is waaaaayyy to long to be read.
It's pretty bad when lines get wrapped in your editor or when you have to
scroll horizontally to be able to see it well. Gosh, can Emacs relieve me of
the pain of keeping documentation columns straight??
"""
```fill-region in doc strings1 parent 9564992 commit b175798
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
508 | 519 | | |
509 | 520 | | |
510 | 521 | | |
| |||
0 commit comments