There are functions that I never use intentionally. Sometimes, these functions (e.g. org-archive-subtree-default) are used by me by inadvertence, due to typing errors.

How could I deactivate such a function, So that even if I type its keybinding it won't perform any action?

1 Answer 1


See https://stackoverflow.com/questions/13965966/unset-key-binding-in-emacs/13966287#13966287 for how to unset key bindings.

Note that in general you wouldn't want to "deactivate" the functions themselves -- even if you don't want to invoke them interactively, other functionality you do need might be calling those functions behind the scenes, so it's important not to mess with them unnecessarily.

Removing the keybindings is enough to ensure you don't use them by accident.

  • 1
    You can redefine or undefine named functions, but you shouldn't do that to achieve the goal of this question. Read C-h i g (elisp)Defining Functions if you still want to do those things regardless.
    – phils
    Commented Apr 28, 2023 at 15:23
  • I think (fmakunbound org-archive-subtree-default) is what I was looking for.
    – crocefisso
    Commented Apr 28, 2023 at 15:32

Your Answer

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

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