Emacs bzr の最近 (数日間) の変更により、defadvice
以前のバージョンの Emacs で動作していたコードを使用すると、非常に奇妙なエラーが発生しました。通常、私は例えば
Debugger entered--Lisp error: (wrong-type-argument symbolp #[(file newname &optional ok-if-already-exists)
...
ad-activate(rename-file nil)
たとえば、コンパイルされたバージョンをロードしようとするとき
(defadvice rename-file (around sync-ectags-rename-file (file newname &optional ok-if-already-exists) activate)
"Update ectags for renaming of FILE to NEWNAME."
(ectags-unregister-tag-file file)
ad-do-it
(ectags-register-tag-file newname))
ただし、C-x C-e
上記を使用した式の評価は正常に機能します。私は何時間も何が悪いのかを理解しようとしましたが、うまくいきませんでした。同様の問題は、私が関数にアドバイスする他のいくつかのケースでも発生します。