]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix last change in tempo.el
authorMorgan Willcock <morgan@ice9.digital>
Sun, 31 Dec 2023 20:47:17 +0000 (20:47 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 4 Jan 2024 21:17:35 +0000 (22:17 +0100)
* lisp/tempo.el: Set marker type for tempo-region-start to
move when text is inserted at its position.  This prevents
the template from inserting text into the region.  (Bug#68185)

(cherry picked from commit d69fb6dab28e55447516341cf28f1b6d06937ad6)

lisp/tempo.el

index f32313d80d0cf33d0d6ec25e24919368684d5d54..513e778e4ef29a091d1364cd07d542ab4202c0d4 100644 (file)
@@ -198,6 +198,10 @@ This is an abnormal hook where the functions are called with one argument
 (defvar-local tempo-region-start (make-marker)
   "Region start when inserting around the region.")
 
+;; Insertion by the template at the region start position should move
+;; the marker to preserve the original region contents.
+(set-marker-insertion-type tempo-region-start t)
+
 (defvar-local tempo-region-stop (make-marker)
   "Region stop when inserting around the region.")