英文:
How to find the cause of "Warning (bytecomp): Unused lexical variable ‘start’" during start-up?
问题
I am not using Emacs (27.2 on macOS, installed via Homebrew) on a regular basis anymore but get the warning
Warning (bytecomp): Unused lexical variable ‘start’
since a few weeks when starting Emacs. I skimmed through my init.el but there is no code using a variable start
. So I assume that some package causes this inconvenience. Is there any elegant way to find the source for this warning? I understand what it is about but was wondering whether there is a better way than to either ignore it or to bisect my config file until I find the right spot.
英文:
I am not using Emacs (27.2 on macOS, installed via Homebrew) on a regular basis anymore but get the warning
Warning (bytecomp): Unused lexical variable ‘start’
since a few weeks when starting Emacs. I skimmed through my init.el but there is no code using a variable start
. So I assume that some package causes this inconvenience. Is there any elegant way to find the source for this warning? I understand what it is about but was wondering wether there is a better way than to either ignore it or to bisect my config file until I find the right spot.
答案1
得分: 1
分割您的初始化文件,将1/2、3/4、7/8等部分注释掉,直到找到问题文件。
您还可以对任何文件进行字节编译,以获取可点击的警告 - 单击该警告应该将您带到有问题的未使用词法变量。
(还要记住警告只是警告。这并不意味着一定存在阻止事物正常工作的问题。)
英文:
Bisect your init file, commenting out 1/2, then 3/4, 7/8,... till you find the culprit file.
You can also byte-compile any file, to get clickable warnings - clicking that warning should take you to the problematic unused lexical variable.
(Keep in mind also that the warning is just that. It doesn't mean that there's necessarily a problem that prevents things from working.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论