unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
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)	[thread overview]
Message-ID: <Pine.LNX.3.96.1060523200701.796C-100000@acm.acm> (raw)
In-Reply-To: <jewtcc634z.fsf@sykes.suse.de>

'n Abend, Andreas!

On Tue, 23 May 2006, Andreas Schwab wrote:

>Alan Mackenzie <acm@muc.de> 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.

  reply	other threads:[~2006-05-23 20:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 21:11 Clarification of eval-after-load [was: Problem mit symlinks, locate-library and load-history] Alan Mackenzie
2006-05-11 16:46 ` Stuart D. Herring
2006-05-11 17:19   ` Alan Mackenzie
2006-05-11 17:46     ` Stuart D. Herring
2006-05-11 21:44       ` Alan Mackenzie
2006-05-12  4:15       ` Richard Stallman
2006-05-14 11:07 ` FIXED!! " Alan Mackenzie
2006-05-15  5:13   ` Richard Stallman
2006-05-21  9:39     ` Alan Mackenzie
2006-05-22  2:39       ` Richard Stallman
2006-05-23 17:21         ` Alan Mackenzie
2006-05-23 17:51           ` Andreas Schwab
2006-05-23 20:10             ` Alan Mackenzie [this message]
2006-05-23 20:58             ` FIXED!! Re: Clarification of eval-after-load Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1060523200701.796C-100000@acm.acm \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).