From 3bf21f52b653a71801d371fcac0fcc862a95ec32 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Feb 2021 18:24:28 +0100 Subject: [PATCH] Deactivate region in `C-c C-r' in python-mode * lisp/progmodes/python.el (python-shell-send-region): Deactivate mark after executing (bug#28789). This is how this command worked in Emacs 24, apparently. --- lisp/progmodes/python.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d6c0a4d1dbf..afb96974b17 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3273,7 +3273,8 @@ process running; defaults to t when called interactively." ;; lines have been removed/added. (with-current-buffer (process-buffer process) (compilation-forget-errors)) - (python-shell-send-string string process))) + (python-shell-send-string string process) + (deactivate-mark))) (defun python-shell-send-statement (&optional send-main msg) "Send the statement at point to inferior Python process. -- 2.39.2