Dealing with a one-file elisp package, I wonder if there is a nice way to see unused functions and variables after some major refactoring. I can go through the code and do xref-find-references
. But maybe there is an easier way to get a quick overview, even for the price of false positives.
Add a comment
|
1 Answer
Byte-compiling the file will show you warnings about unused lexically-bound variables. But it won't let you know whether dynamically bound things (variables, including options; functions; macros) are "used" in the same file.
(This is normal, since they might well be used by other code, outside the file. E.g. maybe you define a command that anyone can use, but no code in your file calls that function.)