From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history] Date: Tue, 23 May 2006 20:10:47 +0000 (GMT) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1148414792 8123 80.91.229.2 (23 May 2006 20:06:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 May 2006 20:06:32 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 23 22:06:30 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fid8y-0006zq-BS for ged-emacs-devel@m.gmane.org; Tue, 23 May 2006 22:06:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fid8x-0004Ti-SP for ged-emacs-devel@m.gmane.org; Tue, 23 May 2006 16:06:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fid8k-0004TN-T7 for emacs-devel@gnu.org; Tue, 23 May 2006 16:06:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fid8j-0004Ss-TX for emacs-devel@gnu.org; Tue, 23 May 2006 16:06:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fid8j-0004Si-KH for emacs-devel@gnu.org; Tue, 23 May 2006 16:06:01 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FidCz-00063e-Pr; Tue, 23 May 2006 16:10:26 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id UAA01526; Tue, 23 May 2006 20:10:48 GMT X-Sender: root@acm.acm Original-To: Andreas Schwab In-Reply-To: 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:55154 Archived-At: 'n Abend, Andreas! On Tue, 23 May 2006, Andreas Schwab wrote: >Alan Mackenzie writes: > >> --- 1385,1499 ---- >> t)) >> nil)) >> >> + (defun list-to-regexp (arg) >> + "Build a regexp that matches any of the elements of ARG, a list of strings." >> + (if arg >> + (let ((regexp "\\(")) >> + (mapc (lambda (elt) >> + (setq regexp (concat regexp (regexp-quote elt) "\\|"))) >> + arg) >> + (aset regexp (1- (length regexp)) ?\)) >> + regexp) >> + "")) >I think this is equivalent to this: > > (concat "\\(" (mapconcat 'regexp-quote arg "\\|") "\\)") Thanks! I didn't know about mapconcat. Even better, mapconcat is a built-in function, so there's no hassle with order of loading files.el, or with CL or anything like that. So yes, I'll put the form in that you suggest, since it's certainly an improvement. Thanks again! >Andreas. -- Alan.