From 6bfdc2e29f72fda0bb19ee78daf625e2224e27ce Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 12 Jan 2001 19:51:09 +0000 Subject: [PATCH] (last): Handle a list that doesn't end in nil. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 3a60e15b0e5..2d6a72a6ac5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -131,7 +131,7 @@ If N is bigger than the length of X, return X." (setq m (1+ m) p (cdr p))) (if (<= n 0) p (if (< n m) (nthcdr (- m n) x) x))) - (while (cdr x) + (while (consp (cdr x)) (setq x (cdr x))) x)) -- 2.39.5