Skip to content

Commit add8552

Browse files
larsmagnekyleam
authored andcommitted
Backport commit 48aacbf29 from Emacs
* lisp/oc-basic.el (org-cite-basic--set-keymap): Adjust buffer-substring generalized variable usage. Make many seldom-used generalized variables obsolete 48aacbf292fbe8d4be7761f83bf87de93497df27 Lars Ingebrigtsen Sun Aug 21 22:12:43 2022 +0200 [ km: This was independently covered on the main branch with a526ea6. I'm applying it here too for bookkeeping/traceability purposes. ]
1 parent e58217f commit add8552

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lisp/oc-basic.el

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,13 @@ substitutes for the unknown key. Finally, it may be the symbol
460460
(_
461461
(lambda ()
462462
(interactive)
463-
(setf (buffer-substring beg end)
464-
(concat "@"
465-
(if (= 1 (length suggestions))
466-
(car suggestions)
467-
(completing-read "Did you mean: "
468-
suggestions nil t))))))))
463+
(goto-char beg)
464+
(delete-region beg end)
465+
(insert "@"
466+
(if (= 1 (length suggestions))
467+
(car suggestions)
468+
(completing-read "Did you mean: "
469+
suggestions nil t)))))))
469470
(put-text-property beg end 'keymap km)))
470471

471472
(defun org-cite-basic-activate (citation)

0 commit comments

Comments
 (0)