For what I do I tend to define a lot of functions that I use temporarily. Life span is usually about 1-2 weeks - and then I define a new set of functions.

I was not able to find where these definitions actually are, nor how to delete them just by supplying a function name (which would be useful).

  • 3
    Why bother? They'll go away if and when you next restart Emacs (unless you're saving them in your .emacs).
    – Barmar
    Dec 27, 2018 at 22:57
  • 1
    @Barmar. See, I didn't know that. My question got edited multiple times. What I do is to define a keyboard macro, save it as a functions, and bind it to a shortcut. Once I am done with what I do, usually define so more and rebind. But the function is still there if I press M-x. Hence the question. PS. I don't know a lot of Emacs internals so it might seem like an obvious question for some.
    – A_P
    Dec 28, 2018 at 13:01

2 Answers 2


In addition to removing the function definition with fmakunbound and variable binding with makunbound, you can also remove the name itself with unintern.

Note also that, unless you save your definitions in a file (e.g., init file) and load it, your functions and variables will be gone when you restart Emacs.


Functions are unbound with:

(fmakunbound 'NAME)

(The equivalent for variables is makunbound.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.