From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: dolist? Date: Sat, 02 Jul 2005 20:33:23 +0200 Message-ID: <42C6DDF3.4070605@student.lu.se> References: <42C67DD0.4060006@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120330988 8583 80.91.229.2 (2 Jul 2005 19:03:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Jul 2005 19:03:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 02 21:03:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DonGU-0000Ja-Oy for ged-emacs-devel@m.gmane.org; Sat, 02 Jul 2005 21:02:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DonHb-0000ye-Ru for ged-emacs-devel@m.gmane.org; Sat, 02 Jul 2005 15:04:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DonFd-0000Q0-CO for emacs-devel@gnu.org; Sat, 02 Jul 2005 15:02:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DonFc-0000PZ-J8 for emacs-devel@gnu.org; Sat, 02 Jul 2005 15:02:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DonF7-0000Ab-Qz for emacs-devel@gnu.org; Sat, 02 Jul 2005 15:01:33 -0400 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DomtG-0000OC-T9 for emacs-devel@gnu.org; Sat, 02 Jul 2005 14:38:59 -0400 Original-Received: from [192.168.123.121] (83.249.205.6) by pne-smtpout2-sn1.fre.skanova.net (7.2.060.1) id 42B93717001E23E1 for emacs-devel@gnu.org; Sat, 2 Jul 2005 20:33:24 +0200 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <42C67DD0.4060006@student.lu.se> 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:40136 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40136 Lennart Borgman wrote: > I am trying to use dolist in the function below. When I comment out > the line marked below I only get the first det from detlst. What is > wrong? Is dolist a no-no? Or is this a bug? Since I sent my last update reply on this to myself instead of the list I am trying again... Here is a better example for testing. Please test this with the marked message commented out and not commented out. Just put it in a buffer and eval it. Am I doing something seriously silly? Has someone checked this or should I file a bug? --lennart ******** Test example, run with marked line COMMENTED OUT/NOT COMMENTED OUT. Check *Messages*. (defconst assoc-assoc-list nil) (setq assoc-assoc-list '( ("cedet-1.03b" ( (description . "CEDET") (install-function . 'cedet-setup) )) ("nxml-mode-20041004" ( (description . "NXML") (install-function . 'nxml-setup) )) )) (defun check-detail(consdet) (unless nil ;;(message " consdet=%s" consdet) ;; <---- does not work unless this is NOT commented out ) (let ((detname (car consdet))) (message (concat " ... checking detail \"" (symbol-name detname) "\"")))) (defun check-list() (message "Checking package list detail names...") (mapc (lambda (pack) (let ((detlst (nth 1 pack))) (when detlst (message "\ndetlst=%s" detlst) (mapc 'check-detail detlst)))) assoc-assoc-list)) (check-list) ********** If run with marked line COMMENTED OUT it gives this: Checking package list detail names... detlst=((description . CEDET) (install-function quote cedet-setup)) ... checking detail "install-function" detlst=((description . NXML) (install-function quote nxml-setup)) ... checking detail "install-function" ********** If run with marked line NOT COMMENTED OUT it gives this: Checking package list detail names... detlst=((description . CEDET) (install-function quote cedet-setup)) consdet=(description . CEDET) ... checking detail "description" consdet=(install-function quote cedet-setup) ... checking detail "install-function" detlst=((description . NXML) (install-function quote nxml-setup)) consdet=(description . NXML) ... checking detail "description" consdet=(install-function quote nxml-setup) ... checking detail "install-function"