1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-05 05:21:26 -08:00
emacs/test/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
..
c-ts-mode-resources
cperl-mode-resources ;cperl-mode.el: Do not mistake a left-shift operator for a here-doc. 2023-10-14 18:22:11 +02:00
elisp-mode-resources
elixir-ts-mode-resources Fix treesit-langauge-at-point for elixir-ts-mode. 2023-09-26 23:23:54 -07:00
flymake-resources
go-ts-mode-resources
heex-ts-mode-resources
java-ts-mode-resources
js-resources
lua-ts-mode-resources Various improvements to lua-ts-mode (Bug#66159) 2023-10-23 10:07:52 +02:00
project-resources
ruby-mode-resources
sh-script-resources Fix indentation and fontification in shell-script (Bug#26217) 2023-10-14 11:00:15 -04:00
typescript-ts-mode-resources
xref-resources
asm-mode-tests.el
autoconf-tests.el
bat-mode-tests.el
bug-reference-tests.el
c-ts-mode-tests.el
cc-mode-tests.el
compile-tests.el Omit the omake compilation-mode rule by default 2023-10-05 12:25:57 +02:00
cperl-mode-tests.el ;cperl-mode.el: Do not mistake a left-shift operator for a here-doc. 2023-10-14 18:22:11 +02:00
eglot-tests.el ; Silence byte-compiler 2023-09-06 14:15:00 +02:00
elisp-mode-tests.el Use new ERT skip-when macro in tests 2023-09-04 18:25:18 +02:00
elixir-ts-mode-tests.el
etags-tests.el
executable-tests.el
f90-tests.el
flymake-tests.el Flymake: unbreak tests 2023-09-24 09:07:27 +01:00
gdb-mi-tests.el
glasses-tests.el
go-ts-mode-tests.el
grep-tests.el
heex-ts-mode-tests.el
hideshow-tests.el
java-ts-mode-tests.el
js-tests.el
lua-ts-mode-tests.el bug#65673: Add lua-ts-mode 2023-09-16 13:01:43 +03:00
octave-tests.el
opascal-tests.el
pascal-tests.el
perl-mode-tests.el Fix perl-mode indentation after a hanging paren 2023-09-07 00:13:53 +02:00
project-tests.el (project-try-vc): When found non-VC project root, still search for the backend 2023-09-06 23:30:42 +03:00
ps-mode-tests.el
python-tests.el Use new ERT skip-when macro in tests 2023-09-04 18:25:18 +02:00
ruby-mode-tests.el
ruby-ts-mode-tests.el
scheme-tests.el
sh-script-tests.el Fix indentation and fontification in shell-script (Bug#26217) 2023-10-14 11:00:15 -04:00
sql-tests.el
subword-tests.el
tcl-tests.el
typescript-ts-mode-tests.el
which-func-tests.el Remove the header line after disabling 'which-function-mode' 2023-10-29 13:21:03 +02:00
xref-tests.el