>>> I hope that in a more general case we could use something similar, >>> since every definition of a function should start from "defun " >>> followed by some part of its name, right? >> >> Not always, I can imagine functions defined with fset for example. >> >> What about the attached patch? It seems to work well. > > SGTM. With which cases did you test this? > > Adding Stefan, in case he has any comments. > Mainly with the original recipe and some variants of it. I attach a slightly improved version of the patch.