diff lisp/subr.el @ 110972:dff76f22a051

lisp/subr.el (last): Deal with dotted lists (reported in bug#7174).
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 14 Oct 2010 01:43:39 +0200
parents 80846b446563
children bad40b05a0df
line wrap: on
line diff
--- a/lisp/subr.el	Thu Oct 14 01:15:03 2010 +0200
+++ b/lisp/subr.el	Thu Oct 14 01:43:39 2010 +0200
@@ -289,7 +289,7 @@
 If N is non-nil, return the Nth-to-last link of LIST.
 If N is bigger than the length of LIST, return LIST."
   (if n
-      (and (> n 0)
+      (and (>= n 0)
            (let ((m (safe-length list)))
              (if (< n m) (nthcdr (- m n) list) list)))
     (and list