[Top][All Lists]

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

Re: locate-file in Emacs

From: Hrvoje Niksic
Subject: Re: locate-file in Emacs
Date: Thu, 18 Apr 2002 17:11:32 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i686-pc-linux)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

>> That would break backward compatibility, which is fairly important in
> I fail to see why:
>       (defun locate-file (f p s predicate)
>         (cond
>          ((memq predicate '(executable writable ...)) ...)

That's fine; I thought you wanted to disallow old-style MODE in favor
of PREDICATE which you found easier to implement.

> you should be able to keep backward compatibility just fine.
> The qusetion is whether or not you find the `predicate' interface
> preferable.

I find this "mixing" of interfaces far from elegant, but I'll agree
that it's flexible.  If that's your price of keeping a unified
interface, I'll accept.  But I'd prefer to just keep MODE.

> PS: a grep through XEmacs packages seems to indicate that the MODE
>     argument is rarely used and that the few times it's used it's
>     only to check executablility but uses the integer 1 instead of
>     the `executable' symbol.

That's the old interface, which XEmacs still supports.  In it the MODE
was a number equivalent to what access() accepts as the second arg,
and the SUFFIXES were one colon-separated string.

But I don't require GNU Emacs to support this old interface.

>     So assuming that the core code is updated to the new interface,
>     I'm not even sure if `executable', `writable' and friends needs
>     to be supported

Then you don't care about the compatibility with the existing XEmacs
interface.  I can understand that, because you don't have to support
its uses; but I do.  If it means something to you as a "proof", I've
used it in my programs.

reply via email to

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