Commit 10e4702a authored by Glenn Morris's avatar Glenn Morris Committed by Juanma Barranquero
Browse files

lisp/subr.el (last): Deal with dotted lists (reported in bug#7174).

parent 88f427d5
2010-10-13 Glenn Morris <>
* subr.el (last): Deal with dotted lists (reported in bug#7174).
2010-10-13 Stephen Berman <>
* subr.el (last): Use `safe-length' instead of `length' (bug#7206).
......@@ -289,7 +289,7 @@ If LIST is nil, return nil.
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment