Subject: Re: bug#18522: 24.4.50; mapcar is very slow

From: Eli Zaretskii <[email-masked]>
Date: Fri, 26 Feb 2016 11:28:05 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Peter Münster <[email-masked]>,
>   [email-masked]
> Date: Fri, 26 Feb 2016 13:43:44 +1030
> 
> Since we've already downcased the entire string, both the
> `case-fold-search' and the match to [[:upper:]] seem rather
> nonsensical?  So that should be fixed, but:
> 
> >  . set-default should skip killed buffers
> 
> Yes.  I think that would be a win in general.
> 
> > For the second issue, I propose to modify set-default to use
> > FOR_EACH_LIVE_BUFFER instead of FOR_EACH_BUFFER.  Does anyone see a
> > problem with that?
> 
> Hm...  If a buffer is killed, do the local variables still have an
> effect?  I'm thinking of code like:
> 
> (with-temp-buffer
>   (setq-local foo 'bar)
>   (kill-buffer (current-buffer))
>   (let ((buf (current-buffer)))
>     (with-temp-buffer
>       (let ((foo 'zot))
>         (set-buffer buf)
>         foo))))
> 
> Well, that answered itself.  :-) It returns zot.  (If we don't kill it
> returns bar.)  So I don't see any reason not to use FOR_EACH_LIVE_BUFFER
> here.

Btw, why did you fix all those on master?  I think this should be
fixed on emacs-25 instead.

Thanks.