emacs/lisp/progmodes
Spencer Baugh 3dca52dd42 Remove the header line after disabling 'which-function-mode'
Previously, the header line would stay around even when after
disabling 'which-function-mode', although it may be empty.  Now
the 'which-function-mode' element is properly removed from
'header-line-format', so the header line will disappear if
there's nothing else in 'header-line-format'.

Also, previously, when we ran (which-function-mode), we would
enable
'which-function-mode' for all buffers even if they didn't support
imenu.  We didn't run the normal logic in 'which-func-ff-hook' to
disable 'which-func-mode' if imenu wasn't present.  Now we do run
that logic, by just calling 'which-func-ff-hook'.  This is
especially important when the header line is enabled, because
otherwise there's a very noticeable header line added to every
buffer, including e.g. *Help* and *Buffer List*.

Also, we now check that 'header-line-format' is a list before trying
to add to it; this makes us work properly when enabling and
disabling 'which-function-mode' for modes which set
'header-line-format' to a string or symbol, such as eww.

* lisp/progmodes/which-func.el (which-func-try-to-enable): Re-add
'which-func-format' to the header line.
(which-func--header-line-remove): New function.
(which-func--disable): Call 'which-func--header-line-remove'.
(which-function-mode): Call 'which-func-ff-hook' and
'which-func--header-line-remove'. (bug#66283)
* test/lisp/progmodes/which-func-tests.el: New test.
2023-10-29 13:21:03 +02:00
..
antlr-mode.el
asm-mode.el Fix all my attributions to be correct and consistent... 2023-08-08 20:07:52 -04:00
autoconf.el
bat-mode.el
bug-reference.el
c-ts-common.el Add missing builtin package declarations 2023-09-18 01:55:28 +02:00
c-ts-mode.el Merge from origin/emacs-29 2023-09-16 07:36:49 -04:00
cc-align.el Correct handling of template markers on deletion/insertion 2023-06-21 15:43:41 +00:00
cc-awk.el CC Mode: Fix bug in whitespace scanning functions 2023-09-29 12:07:32 +00:00
cc-bytecomp.el
cc-cmds.el c-indent-new-comment-line: don't test for a macro in a comment 2023-10-15 10:54:23 +00:00
cc-defs.el Fix an infinite loop in c-beginning-of-defun-1 2023-10-14 19:16:45 +00:00
cc-engine.el Fix c-in-knr-argdecl to avoid false recognition of K&R 2023-10-13 14:27:18 +00:00
cc-fonts.el Merge from origin/emacs-29 2023-07-08 05:46:10 -04:00
cc-guess.el
cc-langs.el CC Mode (some languages): handle string lines ending in \\ 2023-07-20 19:33:42 +00:00
cc-menus.el
cc-mode.el (c-initialize-cc-mode): Be slightly more explicit 2023-10-27 21:17:38 -04:00
cc-styles.el
cc-vars.el Fontify C, C++, Objective C identifiers containing $ 2023-06-28 18:29:39 +00:00
cfengine.el
cl-font-lock.el
cmacexp.el
cmake-ts-mode.el Update CMake support due to upstream changes (bug#64922) 2023-07-29 21:10:57 +02:00
compile.el Omit the omake compilation-mode rule by default 2023-10-05 12:25:57 +02:00
cperl-mode.el ; cperl-mode.el: Remove a duplicate defvar 2023-10-26 21:55:31 +02:00
cpp.el
csharp-mode.el Merge from origin/emacs-29 2023-09-09 04:32:45 -04:00
cwarn.el
dcl-mode.el
dockerfile-ts-mode.el Obsolete treesit-block/sexp/sentence/text-type-regexp 2023-09-01 20:38:25 -07:00
ebnf-abn.el
ebnf-bnf.el
ebnf-dtd.el
ebnf-ebx.el
ebnf-iso.el
ebnf-otz.el
ebnf-yac.el
ebnf2ps.el ; Silence warnings about obsolete functions 2023-09-03 11:47:01 +02:00
ebrowse.el
eglot.el Fix eglot-report-progress :type 2023-10-21 12:05:31 +02:00
elisp-mode.el Silence macro expansion during completion at point 2023-10-05 14:00:36 -04:00
elixir-ts-mode.el Simplify sigil font-lock match for elixir-ts-mode 2023-10-26 03:26:23 +03:00
erts-mode.el
etags.el Fix searching for tags in compressed files 2023-10-15 00:09:52 -04:00
executable.el
f90.el ; Delete redundant defvars; font-lock is preloaded 2023-08-25 23:54:51 +02:00
flymake-cc.el
flymake-proc.el ; flymake-proc.el: move variable declarations 2023-09-25 15:16:31 +02:00
flymake.el Flymake: protect against problematic invalid diagnostics 2023-10-26 14:21:04 +01:00
fortran.el ; Fix spelling of my name in all source files 2023-10-10 16:31:53 +02:00
gdb-mi.el ; Fix last change in gdb-mi.el 2023-09-16 13:41:07 +03:00
glasses.el
go-ts-mode.el Merge from origin/emacs-29 2023-06-24 07:13:42 -04:00
grep.el Merge from origin/emacs-29 2023-07-08 05:46:10 -04:00
gud.el LLDB support: cope with inserted text being write-protected 2023-10-25 12:14:57 +02:00
heex-ts-mode.el Obsolete treesit-block/sexp/sentence/text-type-regexp 2023-09-01 20:38:25 -07:00
hideif.el
hideshow.el bug#65673: Add lua-ts-mode 2023-09-16 13:01:43 +03:00
icon.el
idlw-complete-structtag.el
idlw-help.el ; Delete redundant defvars; font-lock is preloaded 2023-08-25 23:54:51 +02:00
idlw-shell.el
idlw-toolbar.el
idlwave.el Address defcustom :type warnings 2023-09-26 09:29:39 +02:00
inf-lisp.el
java-ts-mode.el Extract feature list of java-ts-mode to a variable 2023-09-26 23:23:53 -07:00
js.el ; * lisp/progmodes/js.el (js--treesit-sexp-nodes): Fix docstring. 2023-10-21 11:08:58 -07:00
json-ts-mode.el Obsolete treesit-block/sexp/sentence/text-type-regexp 2023-09-01 20:38:25 -07:00
ld-script.el
lua-ts-mode.el Improve imenu support in lua-ts-mode 2023-10-25 16:49:31 +03:00
m4-mode.el
make-mode.el Make Makefile browser obsolete 2023-08-29 18:28:57 +02:00
meta-mode.el
mixal-mode.el
modula2.el
octave.el ; Fix broken links to gmane.org 2023-10-24 09:44:01 +02:00
opascal.el
pascal.el
perl-mode.el Fix indentation in perl-mode (Bug#35925) 2023-10-01 04:13:17 +02:00
prog-mode.el Merge from origin/emacs-29 2023-09-16 07:36:49 -04:00
project.el project--switch-project-command: Retouch 2023-10-20 22:04:03 +03:00
prolog.el
ps-mode.el Address defcustom :type warnings 2023-09-26 09:29:39 +02:00
python.el ; Add missing GNU ELPA :core package statements 2023-10-01 00:09:05 +02:00
ruby-mode.el Fix a defcustom :type 2023-10-12 19:10:58 +03:00
ruby-ts-mode.el Obsolete treesit-block/sexp/sentence/text-type-regexp 2023-09-01 20:38:25 -07:00
rust-ts-mode.el Add prettify-symbols configuration to 'rust-ts-mode' 2023-09-17 12:57:23 +03:00
scheme.el Avoid using rx any for not-newline 2023-05-30 17:44:53 +02:00
sh-script.el Fix indentation and fontification in shell-script (Bug#26217) 2023-10-14 11:00:15 -04:00
simula.el
sql.el ; Delete redundant defvars; font-lock is preloaded 2023-08-25 23:54:51 +02:00
subword.el
tcl.el
typescript-ts-mode.el Merge from origin/emacs-29 2023-10-28 04:56:22 -04:00
vera-mode.el ; Update vhdl-mode and vera-mode URLs 2023-08-23 12:32:48 +02:00
verilog-mode.el verilog-mode.el: remove impossible cond clause 2023-10-13 15:23:56 +02:00
vhdl-mode.el ; Update vhdl-mode and vera-mode URLs 2023-08-23 12:32:48 +02:00
which-func.el Remove the header line after disabling 'which-function-mode' 2023-10-29 13:21:03 +02:00
xref.el xref-backend-references: Avoid finding duplicates 2023-10-23 23:51:20 +03:00
xscheme.el