bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31211: 27.0.50; Pruning of command-history in command-execute is off


From: Noam Postavsky
Subject: bug#31211: 27.0.50; Pruning of command-history in command-execute is off by one
Date: Fri, 20 Apr 2018 08:53:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

severity 31211 minor
quit

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Subject: [PATCH 1/2] Improve simple.el history and ring pruning
>
> * lisp/simple.el (command-execute):
> Fix off-by-one error in command-history pruning. (bug#31211)
> (kill-new, push-mark): Prune kill-ring, mark-ring and
> global-mark-ring in a single pass, as add-to-history does.

You need to change call-interactively in callint.c in order to fix the
test case from your OP though, right?  This part:

      /* Don't keep command history around forever.  */
      if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0)
        {
          Lisp_Object teml = Fnthcdr (Vhistory_length, Vcommand_history);
          if (CONSP (teml))
            XSETCDR (teml, Qnil);
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]