Subject: Re: bug#66317: Project mode-line

From: Dmitry Gutov <[email-masked]>
Date: Thu, 5 Oct 2023 23:23:17 +0300

On 04/10/2023 09:18, Juri Linkov wrote:
> diff --git a/lisp/bindings.el b/lisp/bindings.el
> index 207adb3a2a4..70e4087e131 100644
> --- a/lisp/bindings.el
> +++ b/lisp/bindings.el
> @@ -682,6 +682,7 @@ mode-line-end-spaces
>   	     'mode-line-buffer-identification
>   	     "   "
>   	     'mode-line-position
> +	     '(project-mode-line project-mode-line-format)
>   	     '(vc-mode vc-mode)
>   	     "  "
>   	     'mode-line-modes

Speaking of this change from the first patch, do we want to have 
project-mode-line automatically supported in Emacs <= 29, when they 
install the new version from ELPA? Can we safely do that?

Simply altering mode-line-format, as in the original patch, might mess 
up the custom mode-line the user had set up (or installed). How to only 
change the default mode-line is less obvious, but perhaps checking that 
the current value is equal to (get 'mode-line-format 'standard-value) 
would mean altering is okay.

Or otherwise we should say something in the docstring of 
project-mode-line: that it's only directly supported in Emacs 30, and in 
older versions the user need to add the corresponding entry to the 
mode-line-format by hand.