From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: lists.texi Date: Sat, 18 Jun 2005 19:01:12 -0500 (CDT) Message-ID: <200506190001.j5J01Cl09162@raven.dms.auburn.edu> References: <200506182319.j5INJWF08937@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119140900 24816 80.91.229.2 (19 Jun 2005 00:28:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2005 00:28:20 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 19 02:28:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Djnfb-0001BF-GS for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2005 02:28:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DjnlW-0000Rk-5t for ged-emacs-devel@m.gmane.org; Sat, 18 Jun 2005 20:34:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DjniV-000829-NB for emacs-devel@gnu.org; Sat, 18 Jun 2005 20:31:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DjniN-0007yT-5V for emacs-devel@gnu.org; Sat, 18 Jun 2005 20:31:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DjniK-0007ku-T2 for emacs-devel@gnu.org; Sat, 18 Jun 2005 20:31:04 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DjnJ1-0008Eo-77 for emacs-devel@gnu.org; Sat, 18 Jun 2005 20:04:55 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j5J02XCK015118 for ; Sat, 18 Jun 2005 19:02:33 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j5J01Cl09162; Sat, 18 Jun 2005 19:01:12 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org In-reply-to: <200506182319.j5INJWF08937@raven.dms.auburn.edu> (message from Luc Teirlinck on Sat, 18 Jun 2005 18:19:32 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39092 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39092 >>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: ============================================================