GNU bug report logs -
#79197
[PATCH] ; * lisp/simple.el (yank): Update docstring.
Previous Next
Full log
View this message in rfc822 format
> From: James Thomas <jimjoe <at> gmx.net>
> Cc: 79197 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
> Date: Fri, 15 Aug 2025 01:55:28 +0530
>
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -6354,6 +6354,9 @@ yank
> at beginning, and mark at end.
> With argument N, reinsert the Nth most recent kill.
>
> +With the negative prefix argument, reinsert the earliest kill
> +available.
Should we explain more explicitly what is "the earliest kill
available"? In any case, this sentence is only correct for "C-u -",
but not, say, for "C-u - 3", right?
Maybe we should simply say that negative arguments count from the
earliest kill backwards? And explain that with an example in the
manual?
> @@ -6397,7 +6400,7 @@ yank
> (push-mark)
> (insert-for-yank (current-kill (cond
> ((listp arg) 0)
> - ((eq arg '-) -2)
> + ((eq arg '-) (1- (length kill-ring-yank-pointer)))
> (t (1- arg)))))
I'd prefer to have here code that explicitly handles negative number
arguments in the same way it handles "C-u -". Otherwise,
understanding this code is harder. It also makes the code a tad
harder to maintain, because (1- (length kill-ring-yank-pointer)) is
implicitly dependent on what current-kill does with negative arguments.
Thanks.
This bug report was last modified 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.