emacs-devel
[Top][All Lists]
Advanced

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

Re: [elpa] master 61ad720: packages/nadvice: Fix advice-remove behaviour


From: Michael Albinus
Subject: Re: [elpa] master 61ad720: packages/nadvice: Fix advice-remove behaviour
Date: Mon, 17 Sep 2018 16:12:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>  ;;;###autoload
>  (defun advice-remove (symbol function)
> -  (ad-remove-advice symbol 'around function)
> -  (ad-activate symbol))
> +  ;; Just return nil if there is no advice, rather than signaling an
> +  ;; error.
> +  (condition-case nil
> +      (ad-remove-advice symbol 'around function)
> +    (error nil))
> +  (condition-case nil
> +      (ad-activate symbol)
> +    (error nil)))

I would write

(ignore-errors (ad-remove-advice symbol 'around function))
(ignore-errors (ad-activate symbol))

Best regards, Michael.



reply via email to

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