help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need to turn off defadvice warnings


From: jidanni
Subject: Re: I need to turn off defadvice warnings
Date: Sat, 07 Jan 2012 06:47:13 +0800

OK,
(info "(elisp) Advising Functions")
should mention that advising functions will produce warnings.
And to turn off the warnings, one needs to (setq ad-redefinition-action 
'accept),
and one cannot just turn them off for one advice, with e.g., let().

;(let ((ad-redefinition-action 'accept))
  (setq ad-redefinition-action 'accept)
  (defadvice gnus-summary-select-article-buffer (after jump-to-html-part
                                                     activate)
  "Jump to an html part that emacs-w3m rendered, if any."
  (unless (get-text-property (point) 'mm-inline-text-html-with-w3m)
    (let ((pos (text-property-any (point-min) (point-max)
                                  'mm-inline-text-html-with-w3m t)))
      (gnus-goto-char pos))))
;)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]