emacs-devel
[Top][All Lists]
Advanced

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

Re: Last use of defadvice in Emacs


From: T.V Raman
Subject: Re: Last use of defadvice in Emacs
Date: Thu, 7 Apr 2022 18:49:25 -0700

Stefan, Thank you very much for this.

Couple of items:

1. ad-get-arg vs ad-get-argument: I've always used ad-get-arg --
   however for the last few years I've notied that ad-get-arg is
   getting harder and harder to discover; for the last few years,
   emacs always completes ad-get-arg to ad-get-argument.  I personally
   find ad-get-arg to be more idiomatic and easier to use.

   2. Re ad-return-value -- I've almost never had to explicitly set
      ad-return-value -- in around and after advice, I have always
      returned ad-return-value and have never hit issues --- perhaps
      because I've always wrappered my advice body in a let form --
      not sure. What kind of breakages happen when returning
      ad-return-value vs explicitly setting ad-return-value at the end
      of the advice body?

      3. I've avoided the complexity around preactivation vs
         activation etc by always saying (... pre act comp) in all my
         advice forms and also making sure to name all my advices (in
         my case emacspeak) so one can tell where the advice came
         from.

         
-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



reply via email to

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