From e43daa04dc7040934c701499d2b1d34cf1a68aa2 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 24 Feb 2025 18:23:23 +0100 Subject: [PATCH] (elisp-extract-to-local-variable): Fix off-by-one error --- lisp/progmodes/elisp-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 65c3a416aa3..d48ab93f570 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -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) -- 2.39.5