summaryrefslogtreecommitdiff
path: root/lisp/org/oc-basic.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-08-21 22:12:43 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-08-21 22:12:43 +0200
commit48aacbf292fbe8d4be7761f83bf87de93497df27 (patch)
treeef1808d2ac0d8154967f14d2b07094752045e312 /lisp/org/oc-basic.el
parent6ddcf67052545a0f77233f1a952dc90e296cda35 (diff)
downloademacs-48aacbf292fbe8d4be7761f83bf87de93497df27.tar.gz
emacs-48aacbf292fbe8d4be7761f83bf87de93497df27.tar.bz2
emacs-48aacbf292fbe8d4be7761f83bf87de93497df27.zip
Make many seldom-used generalized variables obsolete
The vast majority of these are unused in-tree, and many of them perform actions that aren't obvious when reading the code. * lisp/server.el (server-ensure-safe-dir): Prefer with-file-modes over letf-ing default-file-modes. (server-start): Ditto. * lisp/winner.el (winner-set-conf): Don't use generalized variable window-height. * lisp/emacs-lisp/gv.el: Make most little-used generalized variables obsolete. * lisp/org/oc-basic.el (org-cite-basic--set-keymap): Adjust buffer-substring generalized variable usage.
Diffstat (limited to 'lisp/org/oc-basic.el')
-rw-r--r--lisp/org/oc-basic.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 8c76e200e4f..398d2e2d3fa 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -460,12 +460,13 @@ substitutes for the unknown key. Finally, it may be the symbol
(_
(lambda ()
(interactive)
- (setf (buffer-substring beg end)
- (concat "@"
- (if (= 1 (length suggestions))
- (car suggestions)
- (completing-read "Did you mean: "
- suggestions nil t))))))))
+ (goto-char beg)
+ (delete-region beg end)
+ (insert "@"
+ (if (= 1 (length suggestions))
+ (car suggestions)
+ (completing-read "Did you mean: "
+ suggestions nil t)))))))
(put-text-property beg end 'keymap km)))
(defun org-cite-basic-activate (citation)