From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Any objection to adding completing-read-function? Date: Tue, 28 Dec 2010 14:45:12 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293565667 15178 80.91.229.12 (28 Dec 2010 19:47:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Dec 2010 19:47:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 28 20:47:42 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PXfWH-0004SM-N9 for ged-emacs-devel@m.gmane.org; Tue, 28 Dec 2010 20:47:41 +0100 Original-Received: from localhost ([127.0.0.1]:53267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXfWH-000767-7d for ged-emacs-devel@m.gmane.org; Tue, 28 Dec 2010 14:47:41 -0500 Original-Received: from [140.186.70.92] (port=52212 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXfWA-000741-Gp for emacs-devel@gnu.org; Tue, 28 Dec 2010 14:47:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXfW9-0002oN-Jj for emacs-devel@gnu.org; Tue, 28 Dec 2010 14:47:34 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:32471 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXfW9-0002o7-H8 for emacs-devel@gnu.org; Tue, 28 Dec 2010 14:47:33 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAPrNGU1FpZcL/2dsb2JhbACkMHS/MoVKBIRljhs X-IronPort-AV: E=Sophos;i="4.60,240,1291611600"; d="scan'208";a="86622816" Original-Received: from 69-165-151-11.dsl.teksavvy.com (HELO pastel.home) ([69.165.151.11]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 28 Dec 2010 14:47:32 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 3D3F358AC9; Tue, 28 Dec 2010 14:45:12 -0500 (EST) In-Reply-To: (Leo's message of "Tue, 28 Dec 2010 19:02:31 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134015 Archived-At: > 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 `completing-read'". Stefan