4

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.

Nisba
  • 895
  • 8
  • 19

1 Answers1

4

I think you're looking for:

(setq mark-even-if-inactive nil)
Stefan
  • 26,154
  • 3
  • 46
  • 84
  • 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 Jun 03 '18 at 12:56
  • @Nisba: Better ask the author of multiple-cursors. – Stefan Jun 03 '18 at 20:06