From 87deb7427b1560c18ee1007fa0eb2b4bcd8162e7 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 21 Oct 2024 14:42:54 +0200 Subject: emacs: Force ‘current-prefix-arg’ to be nil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/emacs/editing.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.config/emacs/editing.el') diff --git a/.config/emacs/editing.el b/.config/emacs/editing.el index 644c7b7..14f87f1 100644 --- a/.config/emacs/editing.el +++ b/.config/emacs/editing.el @@ -212,11 +212,13 @@ If `consult' is available than this command instead calls `consult-yank-from-kill-ring' when called with non-nil ARG." (declare (interactive-only t)) (interactive "*P") - (cond ((null arg) - (yank)) - ((featurep 'consult) - (call-interactively #'consult-yank-from-kill-ring)) - (t - (call-interactively #'yank-from-kill-ring)))) + ;; Avoid ‘current-prefix-arg’ cascading down to ‘yank-from-kill-ring’ + (let (current-prefix-arg) + (cond ((null arg) + (yank)) + ((featurep 'consult) + (call-interactively #'consult-yank-from-kill-ring)) + (t + (call-interactively #'yank-from-kill-ring))))) (provide 'editing) -- cgit v1.2.3