Suppressing ad-handle-definition Warnings in Emacs

[Originally posted by]:

Suppressing ad-handle-definition Warnings in Emacs
As I have been tweaking my Emacs configuration, I noticed that I was getting warnings like the following in *Messages* during Emacs startup:

ad-handle-definition: `tramp-read-passwd' got redefined

I looked into it and these warnings are generated when functions are redefined with defadvice. Most of the warnings I received were coming from third-party packages I had installed, not my own configuration. In any case, they were not helpful, just noise during Emacs startup.

Like everything in Emacs, this is configurable. Turning off the warnings is as easy as adding:

(setq ad-redefinition-action 'accept)

To your .emacs file. I found I had to add it fairly early to ensure that all the warnings were removed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s