[Top][All Lists]

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

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

From: Stefan Monnier
Subject: Re: Any objection to adding completing-read-function?
Date: Tue, 28 Dec 2010 14:45:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> I have modified the patch to be like this. Since there are quite a few
> libraries both in emacs and 3rd party calling completing-read directly,
> in the patch the old completing-read is now completing-read-default and
> the new completing-read calls completing-read-function, which defaults
> to completing-read-default. Is this OK? Thanks.

Yes, looks good.  Feel free to install it, after fixing the details below:

>  DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
>         doc: /* Read a string in the minibuffer, with completion.
> +This function calls `completing-read-function' to do the work, which
> +defaults to `completing-read-default' (which see).  */)

The docstring needs to describe the meaning of all arguments, just as it
did before (i.e. it should stay unmodified, except for mentioning
`completing-read-function').  OTOH it doesn't need to mention the
default value of `completing-read-function'.

> +DEFUN ("completing-read-default", Fcompleting_read_default, 
> Scompleting_read_default, 2, 8, 0,
> +       doc: /* Default function for `completing-read-function'.

This docstring, OTOH, can refer to `completing-read' for the meaning of
its arguments.

> +  DEFVAR_LISP ("completing-read-function",
> +               &Vcompleting_read_function,
> +               doc: /* The function to be called by `completing-read'.  */);

The text should say something like "should accept the same arguments as


reply via email to

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