[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101953: lisp/subr.el (last): Use `sa
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101953: lisp/subr.el (last): Use `safe-length' instead of `length' (bug#7206). |
Date: |
Thu, 14 Oct 2010 01:15:03 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101953
author: Stephen Berman <address@hidden>
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Thu 2010-10-14 01:15:03 +0200
message:
lisp/subr.el (last): Use `safe-length' instead of `length' (bug#7206).
modified:
lisp/ChangeLog
lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-10-13 22:21:20 +0000
+++ b/lisp/ChangeLog 2010-10-13 23:15:03 +0000
@@ -1,3 +1,7 @@
+2010-10-13 Stephen Berman <address@hidden>
+
+ * subr.el (last): Use `safe-length' instead of `length' (bug#7206).
+
2010-10-13 Lars Magne Ingebrigtsen <address@hidden>
* net/tls.el (tls-program): Remove spurious %s from openssl.
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2010-10-13 03:30:36 +0000
+++ b/lisp/subr.el 2010-10-13 23:15:03 +0000
@@ -290,10 +290,10 @@
If N is bigger than the length of LIST, return LIST."
(if n
(and (> n 0)
- (let ((m (length list)))
+ (let ((m (safe-length list)))
(if (< n m) (nthcdr (- m n) list) list)))
(and list
- (nthcdr (1- (length list)) list))))
+ (nthcdr (1- (safe-length list)) list))))
(defun butlast (list &optional n)
"Return a copy of LIST with the last N elements removed."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101953: lisp/subr.el (last): Use `safe-length' instead of `length' (bug#7206).,
Juanma Barranquero <=