如何找到“Warning (bytecomp): Unused lexical variable ‘start’”在启动时的原因?

huangapple go评论80阅读模式
英文:

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.)

huangapple
  • 本文由 发表于 2023年4月7日 04:24:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75953488.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定