Subject: Re: bug#57080: 29.0.60; [PATCH] Updates to mode line construct documentation (was: The %m modeline construct does not work for emacs-lisp-mode)

From: Eli Zaretskii <[email-masked]>
Date: Sat, 18 Mar 2023 09:46:54 +0200

> Date: Sat, 18 Mar 2023 20:22:24 +1300
> From: Phil Sainty <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> Does anyone object to me merging branch 
> fix/bug-57080-mode-line-format-docs
> ( https://lists.gnu.org/archive/html/emacs-diffs/2023-03/msg00453.html )
> to the emacs-29 branch?

It goes too far, IMO, see below.

> It addresses the issue from this bug along with several related things
> that I found in the process of looking at that.
> 
> * The %m documentation was not entirely accurate (as discussed here).

But you moved it from its place near the end of the node (as
appropriate for obsolete features) to the mainline.  Why not leave it
where it was, and just add the explanation why its usage is not
advised?

> * The %M documentation was also not up to date.
> * The %t construct was obsolete but still documented.

So let's move %t to where %m is.

> * The %o and %q constructs were lacking documentation.

In the manual? I don't see them being added there.

> * The `mode-line-format' docstring for all of the constructs was
>    not as easy to read as it could have been.

I would leave this part alone on emacs-29, and only install the
reformatting of the doc string on master.

> The final reformatting of the `mode-line-format' docstring sorts the
> constructs by letter (which makes everything easier to find); eliminates
> multiple constructs being crammed into single lines (which also makes
> everything easier to find); and rephrases some things for (IMHO) easier
> readability and comprehension.

It also makes the text taller, thus requiring a larger Help window.
Is it still reasonably readable in "emacs -Q"?

Anyway, I think this part is for master.

> I untabified the indentation, as that didn't render correctly with a
> tab-width of anything other than 8, which might be a problem for other
> docstrings as well.  Should help-mode set tab-width to 8 ??

tab-width is a user variable, so no Lisp program should set it, IMO.

Bottom line:

  . I'm okay with manual changes, modulo the movement of %m -- it
    should stay where it was.
  . I'm okay with adding %t to the manual (in the "obsolete" part).
  . I'm okay with removing %t from the doc string.
  . I'm okay with fixing the doc string of global-mode-string.
  . All the rest is okay for master.

Thanks.