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

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

Re: Metaprogramming


From: Stefan Monnier
Subject: Re: Metaprogramming
Date: Sun, 15 Sep 2019 09:22:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> This is a  query from over half a decade ago: 
> https://stackoverflow.com/q/22224045

That's not exactly about meta-programming, but rather about a peliminary
step you may (or may not) need for some meta-programming tasks.

> I want to redefine functions by manipulating the pre-existing
> function; is there any way to do this?

Yes, of course.  For example `advice-add` lets you do that.

> I'd rather not just copy the whole function definition into my init.el file
> just to change one LOC;
> maybe there's a better way of doing this part instead?

Then it depends on the specifics:
- what line of code?
- is the function usually compiled?
- is the source code available?
- is there a way to get that result differently?


        Stefan




reply via email to

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