14

When I copy some selected text (kill-ring-save with M-w), I automatically lose my selection. I have tried with Transient Mark Mode with no luck. (Note that I'm not using CUA Mode.)

NVaughan
  • 1,481
  • 12
  • 27
  • I initially thought it was about the X selection (in which case the variable `select-active-regions` would be relevant), but it seems to be about highlighting the region. – YoungFrog Feb 01 '16 at 10:46

1 Answers1

11

The best solution is using C-x C-x to reactivate the mark. But if you want to really keep the selection you can use:

(defun copy-keep-highlight (beg end)
  (interactive "r")
  (prog1 (kill-ring-save beg end)
    (setq deactivate-mark nil)))
djangoliv
  • 3,169
  • 16
  • 31