From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier " Newsgroups: gmane.emacs.help Subject: Re: Creating string from list of strings Date: 14 Oct 2002 03:00:23 -0400 Organization: Yale University Sender: help-gnu-emacs-admin@gnu.org Message-ID: <5ln0phcxo8.fsf@rum.cs.yale.edu> References: <80of9xtu2k.fsf@gbr.newt.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034579588 6965 127.0.0.1 (14 Oct 2002 07:13:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Oct 2002 07:13:08 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 180zPW-0001oD-00 for ; Mon, 14 Oct 2002 09:13:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 180zNh-0003HS-00; Mon, 14 Oct 2002 03:11:13 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.ycc.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: rum.cs.yale.edu User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 14 Oct 2002 03:00:23 -0400, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:106021 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2568 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2568 >>>>> "Bill" == Bill Wohler writes: > (message (perform-magic-with list-of-strings)) Beware! `message' is like `printf' in C: it expects a format argument. So you'd better use (message "%s" (perform-magic-with list-of-strings)) > While the following works, it seems that there should be a one-liner > to do this already: > (defvar my-string) > (while list-of-strings > (setq my-string (concat my-string (car list-of-strings))) > (setq list-of-strings (cdr list-of-strings))) > (message (my-string)) Try `mapconcat'. Stefan