summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-21 14:42:54 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-10-21 14:42:54 +0200
commit87deb7427b1560c18ee1007fa0eb2b4bcd8162e7 (patch)
tree66d6f79cbf79b77976c90cdd4ba813ee02cbd248
parentdd51bdefb6fed6b89d34d8b195f4cc55c01a055f (diff)
emacs: Force ‘current-prefix-arg’ to be nil
-rw-r--r--.config/emacs/editing.el14
1 files changed, 8 insertions, 6 deletions
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)