Loading my local files with require.

This is less code, but more reliable.
Using which-function-mode

Which I have to customize, of course.