Sometimes (rarely I would say) I press C-w by mistake and if the mark defines a non empty region, it gets deleted.

The few times this happened I just pressed undo, but I am afraid that sooner or later I will delete something without noticing.

Is it possible to tell emacs not to delete a region if it is not selected? It never happened to me to wanting to kill a region which was not selected, so this workaround would fix my problem.

1 Answer 1


I think you're looking for:

(setq mark-even-if-inactive nil)
  • exactly what I was looking for.... but it broke multiple cursors! If I select a word and then use mc/mark-next-like-this and then type something, I get an error. Any way to make them work together?
    – Nisba
    Commented Jun 3, 2018 at 12:56
  • @Nisba: Better ask the author of multiple-cursors.
    – Stefan
    Commented Jun 3, 2018 at 20:06

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.