]> git.eshelyaron.com Git - emacs.git/commitdiff
(elisp-extract-to-local-variable): Fix off-by-one error
authorEshel Yaron <me@eshelyaron.com>
Mon, 24 Feb 2025 17:23:23 +0000 (18:23 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 24 Feb 2025 17:23:23 +0000 (18:23 +0100)
lisp/progmodes/elisp-mode.el

index 65c3a416aa33b56ceed410bb85b3c9da6ce517a8..d48ab93f570997babe61e46d96195f25a3878703 100644 (file)
@@ -2532,12 +2532,12 @@ of TARGET."
            (while (el-search-forward
                    (list '\` (read (buffer-substring beg end)))
                    tarend t)
-             (let ((obeg (point)) (oend (1- (scan-sexps (point) 1))))
-               (goto-char oend)
+             (let ((obeg (point)) (oend (scan-sexps (point) 1)))
+               (goto-char (1- oend))
                (when (or (< oend beg) (< end obeg)) ;No overlap.
                  (push (cons obeg oend) others)
                  (let ((ovb (make-overlay obeg (1+ obeg)))
-                       (ove (make-overlay oend (1+ oend))))
+                       (ove (make-overlay (1- oend) oend)))
                    (overlay-put ovb 'face 'isearch)
                    (overlay-put ove 'face 'isearch)
                    (push ovb ovothers)