[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lists.texi
From: |
Luc Teirlinck |
Subject: |
Re: lists.texi |
Date: |
Sat, 18 Jun 2005 19:01:12 -0500 (CDT) |
>From my previous message:
@defun ring-elements ring
This returns a list of the objects in @var{ring}, in no particular
! order. The length of that list is always the ring size. If the ring
! length is less than the ring size, the entries of the list that do not
! correspond to ring elements are @code{nil}.
@end defun
Maybe I am trying to document a bug here. Maybe it is better not to
add these two sentences and instead make `ring-elements' do what the
first sentence above, and its docstring, say it does. `ring-elements'
is not used in the Emacs sources, so the change is not going to break
anything and all it does is make the function work as documented.
I can install if desired.
===File ~/ring.el-diff======================================
*** ring.el 02 Sep 2003 07:41:57 -0500 1.18
--- ring.el 18 Jun 2005 18:45:44 -0500
***************
*** 155,162 ****
(aref vec (ring-index index hd ln (length vec))))))
(defun ring-elements (ring)
! "Return a list of the elements of RING."
! (mapcar #'identity (cddr ring)))
;;; provide ourself:
--- 155,164 ----
(aref vec (ring-index index hd ln (length vec))))))
(defun ring-elements (ring)
! "Return a list of the elements of RING, in no particular order."
! (let (lst)
! (setq lst (delq nil (mapcar #'identity (cddr ring))))
! (nconc lst (make-list (- (ring-length ring) (length lst)) nil))))
;;; provide ourself:
============================================================
- Re: GC, (continued)
- Re: GC, Juri Linkov, 2005/06/26
- Re: GC, Richard M. Stallman, 2005/06/27
- Re: GC, Richard M. Stallman, 2005/06/26
- Re: GC (was: lists.texi), Miles Bader, 2005/06/25
- Re: GC, Gaƫtan LEURENT, 2005/06/25
- Re: GC, Eli Zaretskii, 2005/06/25
- Re: GC (was: lists.texi), Eli Zaretskii, 2005/06/25
- Re: GC (was: lists.texi), Richard M. Stallman, 2005/06/25
- Re: GC, Stefan Monnier, 2005/06/28
- Re: GC, Richard M. Stallman, 2005/06/28
Re: lists.texi,
Luc Teirlinck <=