I am using SLIME (which includes hyperspec.el). I wanted to view the HyperSpec using Emacs' EWW instead of the desktop web browser (e.g. Firefox, Chromium, etc.). To do this, I added an advice to set the web browser to EWW for looking at the HyperSpec:
(advice-add 'hyperspec-lookup
:around
(lambda (orig-fun &rest args)
(let ((browse-url-browser-function 'eww-browse-url))
(apply orig-fun args))))
However, I always get the following message in the *Messages*
buffer the first time I use hyperspec-lookup
after starting Emacs.
Making browse-url-browser-function local to *eww* while let-bound!
Is this an error message? What does it mean? How do I fix it?
hyperspec-lookup
is or does. But the message means that you've made variablebrowse-url-browser-function
a buffer-local variable, but it is a local variable bound bylet
. Your code (above) let-binds that variable, and within thelet
some code makes it a buffer-local variable. You can usedebug-on-entry
forhyperspec-lookup
to walk through the debugger and see what code makes it a buffer-local variable.setq-local
there, to set the value ofbrowse-url-browser-function
, instead of let-binding it.setq-local
solves the problem. Thank you.