[Top][All Lists]

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

RE: Any objection to adding completing-read-function?

From: Drew Adams
Subject: RE: Any objection to adding completing-read-function?
Date: Tue, 28 Dec 2010 08:17:50 -0800

> There's been such requests in the past, which I've usually resisted.
> But I guess it's OK to do such a thing.

Good.  Let's please do it.

> a variable completing-read-function should not allow
> a nil value, instead its default value should be
> `completing-read-default' which is the current completing-read, so you
> can always funcall completing-read-function without checking if
> it's nil.

Then that should have been the approach for `read-file-name-function' as well.
These two should be kept similar (purpose, behavior), IMO.

There are already places (both in vanilla Emacs code and in 3rd-party libraries)
that bind `read-file-name-function' to nil to get the default behavior.

So we have a choice of asymmetry between `read-file-name' and `completing-read'
or breaking existing code and backward compatibility.  Or just doing what Leo
did: use nil for the default behavior.

I agree with what you say about not having to check for nil.  But that's where
we are at present.

reply via email to

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