From: Eshel Yaron Date: Mon, 24 Feb 2025 17:23:23 +0000 (+0100) Subject: (elisp-extract-to-local-variable): Fix off-by-one error X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e43daa04dc7040934c701499d2b1d34cf1a68aa2;p=emacs.git (elisp-extract-to-local-variable): Fix off-by-one error --- 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)