[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116227: * subr.el (butlast): Document what an omitt
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r116227: * subr.el (butlast): Document what an omitted N means. |
Date: |
Sat, 01 Feb 2014 07:55:29 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116227
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/13437
committer: Lars Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Fri 2014-01-31 23:54:29 -0800
message:
* subr.el (butlast): Document what an omitted N means.
* subr.el (butlast): Document what an omitted N means.
(nbutlast): Ditto.
modified:
lisp/subr.el subr.el-20091113204419-o5vbwnq5f7feedwu-151
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2014-01-24 04:11:48 +0000
+++ b/lisp/subr.el 2014-02-01 07:54:29 +0000
@@ -364,12 +364,15 @@
(nthcdr (1- (safe-length list)) list))))
(defun butlast (list &optional n)
- "Return a copy of LIST with the last N elements removed."
+ "Return a copy of LIST with the last N elements removed.
+If N is omitted or nil, the last element is removed from the
+copy."
(if (and n (<= n 0)) list
(nbutlast (copy-sequence list) n)))
(defun nbutlast (list &optional n)
- "Modifies LIST to remove the last N elements."
+ "Modifies LIST to remove the last N elements.
+If N is omitted or nil, remove the last element."
(let ((m (length list)))
(or n (setq n 1))
(and (< n m)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116227: * subr.el (butlast): Document what an omitted N means.,
Lars Ingebrigtsen <=