Trying to get the modeline to show the current c++ function point is in, I modified my modeline in the following way:
(setq-default mode-line-format (quote (#(" " 0 1 ()) mode-line-modified " " mode-line-buffer-identification " " (line-number-mode "%l/") (:eval (number-to-string (count-lines (point-min) (point-max)))) " " mode-line-misc-info " " ))) All is fine, except that now also [eglot:project] is shown in the modeline which I don't want. How can I remove that but keep the function name information (included in mode-line-misc-info)?
The value of mode-line-misc-info as reported by C-h v is:
((eglot--managed-mode (" [" eglot--mode-line-format "] ")) (which-function-mode (which-func-mode (#1="" which-func-format " "))) (global-mode-string (#1# global-mode-string)))
mode-line-misc-info? DoC-h v mode-line-misc-infoto get it and add it to your question.mode-line-misc-infoby evaluating the following form:(setq mode-line-misc-info (cdr mode-line-misc-info)). Does that look more like what you want? N.B. untested and no warranty is provided: you might want to do that in a throw-away session of Emacs, just in case.