[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimizations for flymake

From: Stefan
Subject: Re: Optimizations for flymake
Date: Tue, 02 Nov 2004 07:20:48 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin)

> Because Emacs doesn't have multiple-value-bind.

It sure does.  After doing (eval-when-compile (require 'cl)), that is.

>> I'd actually make it even more efficient than `defsubst':

Oops, I forgot to delete the above line.

> Like this?

> (defalias 'flymake-replace-regexp-in-string
>   (if (fboundp 'replace-regexp-in-string))
>       'replace-regexp-in-string
>     'replace-in-string))

No, the args aren't passed in the right order.

>>> ! (defsubst flymake-get-temp-dir()
>>> !     (if (featurep 'xemacs)
>>> !   (temp-directory)
>>> !       temporary-file-directory))
>> Why not (if (fboundp 'temp-directory) ...) ?

> Would work as well -- but it would hide why we make the check...

Hmm... then I don't understand.  Why do we want temp-directory for XEmacs
and temporary-file-directory for Emacs, other than because that's what is
I.e. why would we not want to use temp-directory under Emacs if someone
defined it?

> It also occurred to me that rather than all the autoloads for the
> various overlay things, it should simply do:

> (require 'overlay)


> Emacs has (featurep 'overlay) => t, so there's no need to
> condition it with (featurep 'xemacs) either.

There's a need to wrap it with condition-case because on Emacs-20,
(featurep 'overlay) => nil.  If we don't care about older Emacsen, wrapping
is unnecessary of course.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]