|
From: | Gregory Heytings |
Subject: | Re: disable region after running a command on it |
Date: | Tue, 13 Dec 2022 13:26:25 +0000 |
is there a way to disable a region every time a command has been run on it? For example, I mark a region, M-x eval-region and I would like that the region selection disappear.
(defun maybe-deactivate-mark () (if (memq this-command '(eval-region ;; other commands after which you want to deactivate mark )) (deactivate-mark))) (add-hook 'post-command-hook #'maybe-deactivate-mark)
[Prev in Thread] | Current Thread | [Next in Thread] |