takutekato · 2022-05-01 15:58
This affects Emacs master/29.
I have defined some custom minor modes without proper docstrings in my config, recently those definition failed:
```
Wrong type argument: char-or-string-p, nil
```
until I changed "" to " " (a single space).
Edit: I found that commit `ec464789dfc5179c72e6929ea99a72f508c562b6` has changed `easy-mmode--mode-docstring`'s behavior on its DOC argument.
Edit: Upstream fixed in commit [51186ed69c361abd73d20a96e929b127cd7f15f9](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=51186ed69c361abd73d20a96e929b127cd7f15f9)
[deleted] · 2022-05-01 16:29
[deleted]
takutekato · 2022-05-01 16:47
I have mentioned Emacs master on the post, maybe that's still vague so let me specify 29.
00-11 · 2022-05-01 22:23
Sounds like bug #[55213](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55213), which was (supposedly) just fixed today.
Bodertz · 2022-05-02 00:02
Is there a reason you prefer an empty string to nil?
takutekato · 2022-05-02 14:51
I didn't know before that DOC can be nil. Intuitively usually when docstring must be supplied but it's not important, "" should suffice, right?
But it's not just me, `lsp-mode` and `lsp-treemacs` were broken, too.
Bodertz · 2022-05-02 23:07
Makes sense. From skimming the code, I think making it nil gives the function a generic docstring, so maybe that's useful. I've never made a minor mode, so I don't know.
>But it's not just me, `lsp-mode` and `lsp-treemacs` were broken, too.
I wasn't criticizing. It was a bug and it's good that it's fixed. I just wondered if you were choosing "" deliberately because you didn't like whatever docstring is provided when you make it nil. But I guess that wasn't it.
Few-Increase-4493 · 2022-05-04 03:04
$65-90k with the right cover photo.