[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symli
From: |
Alan Mackenzie |
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) |
'n Abend, Andreas!
On Tue, 23 May 2006, Andreas Schwab wrote:
>Alan Mackenzie <address@hidden> 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.
- Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], (continued)
FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], Alan Mackenzie, 2006/05/14
- Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], Richard Stallman, 2006/05/15
- Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], Alan Mackenzie, 2006/05/21
- Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], Richard Stallman, 2006/05/21
- Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], Alan Mackenzie, 2006/05/23
- Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history], Andreas Schwab, 2006/05/23
- Re: FIXED!! Re: Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history],
Alan Mackenzie <=
- Re: FIXED!! Re: Clarification of eval-after-load, Stefan Monnier, 2006/05/23