Closed syl20bnr closed 9 years ago
I've noticed this warning before in other situations.
From what I understand, something in your setup is redefining the find-function-search-for-symbol
function (which names
advises). I think Emacs warns you about this redefinition because it could potentially cause the previous advice to not work properly (which, fortunately, doesn't seem to be the case here).
I'll try to find out whether it's anything to worry about, but I don't think it is. Could you try to find out whether this function is being redefined by any other packages?
I too am seeing this warning, and it's causing a bit of (perceived?) lag upon first opening emacs.
As far as I can see the only package I have that uses names
is aggressive-indent:
λ ~/.emacs.d/elpa/ master ag "require 'names"
aggressive-indent-20150516.238/aggressive-indent.el
92:(eval-when-compile (require 'names))
names-20150125.552/names-dev.el
18:;; (require 'names-dev)
39:(require 'names)
names-20150125.552/names.el
635: (require 'names)
Nothing redefines that function either:
ag -s -Q -w find-function-search-for-symbol
auto-complete-20150408.1132/auto-complete.el
1973: (find-function-search-for-symbol symbol nil
names-20150125.552/names-autoloads.el
73:(defadvice find-function-search-for-symbol (around names-around-find-function-search-for-symbol-advice (symbol type library) activate) "\ Make sure `find-function-search-for-symbol' understands namespaces." ad-do-it (ignore-errors (unless (cdr ad-return-value) (with-current-buffer (car ad-return-value) (search-f [:blank:]") (let* ((names--regexp (concat "\\`" (regexp-quote (symbol-name (read (current-buffer)))))) (short-symbol (let ((name (symbol-name symbol))) (when (string-match names--regexp name) (intern (replace-match "" nil nil name)))))) (when short-symbol (ad-set-arg 0 short-symbol) ad-do-it))))))
names-20150125.552/names.el
596:(defadvice find-function-search-for-symbol
597: (around names-around-find-function-search-for-symbol-advice
599: "Make sure `find-function-search-for-symbol' understands namespaces."
If I comment out that defadvice from names-autoload.el
the warning goes away. (My emacs-fu is not strong enough to figure out if that means that names.el is to blame, or whether it's just hiding the symptom.)
I am using version 24.5-1 of emacs installed from here: http://emacsformacosx.com - so it's not just spaceemacs.
Thanks @stig, now that you brought it up again, I think I know how to fix it. In any case, I think the lag you mention is indeed just perceived.
Let me know if it worked! Cheers,
In spacemacs which tries to lazy load everything I have this:
May be related with
aggressive-indent
since it is AFAIK the only package in spacemacs that usesnames
.I can switch off the warning with
ad-redifinition-action
but if I can resolve the warning instead of masking it, it would be better. I wonder if the warning is useful though because when I describefind-function-search-for-symbol
Emacs lists the advice correctly:What's your thoughts about that ?