changeset 35281:be18bd846968

(last): Handle a list that doesn't end in nil.
author Richard M. Stallman <rms@gnu.org>
date Fri, 12 Jan 2001 19:51:09 +0000
parents 3da2255fbb3e
children f722ecf35c43
files lisp/subr.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Fri Jan 12 19:48:56 2001 +0000
+++ b/lisp/subr.el	Fri Jan 12 19:51:09 2001 +0000
@@ -131,7 +131,7 @@
 	  (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))