From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Hong Xu Newsgroups: gmane.emacs.bugs Subject: bug#37538: [PATCH] Add docstring for `tags-complete-tags-table-file'. Date: Sat, 28 Sep 2019 11:40:15 -0700 Message-ID: <7e0290a2-e80b-f566-9c3b-894aaf4e5d9d@topbug.net> References: <36bef08c-45b5-9cce-5374-d4de4260d39a@topbug.net> <838sq8j0vl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="178384"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 37538@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 28 20:59:25 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEHwC-000kIv-SQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2019 20:59:25 +0200 Original-Received: from localhost ([::1]:34494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEHwA-0002hH-Pr for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2019 14:59:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44203) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEHeR-0001ST-4v for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 14:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEHeQ-0006TZ-1M for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 14:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42429) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEHeP-0006TT-UP for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 14:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEHeP-0002Sv-Nr for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2019 14:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hong Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Sep 2019 18:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37538 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37538-submit@debbugs.gnu.org id=B37538.15696960259419 (code B ref 37538); Sat, 28 Sep 2019 18:41:01 +0000 Original-Received: (at 37538) by debbugs.gnu.org; 28 Sep 2019 18:40:25 +0000 Original-Received: from localhost ([127.0.0.1]:51250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEHdo-0002Rr-OE for submit@debbugs.gnu.org; Sat, 28 Sep 2019 14:40:25 -0400 Original-Received: from sender4-of-o55.zoho.com ([136.143.188.55]:21514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEHdn-0002Rj-1J for 37538@debbugs.gnu.org; Sat, 28 Sep 2019 14:40:23 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1569696017; cv=none; d=zoho.com; s=zohoarc; b=EEqfLn9Kp3NJPabSToOxSoj14TtXXj8wSgU0zcHqu+zkvCzJ7K50qkccbdaRsmOIO+JQ3x5NmDmJ1LcHWDxpY/7LoNro0Hs9pC+pVyCsYp8k41SqrtjJNYIqiJ1u2iJofy9Y4LmrN6HM1CLHKaSO0msLierjJmNjLMgf7x8xlbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569696017; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=TNnX6S5ggirD4p7iICxfc8IQpCP6oM/GyMKnGkcaNrU=; b=WkCGWWE1iSEwh4gjBFDqFiqv73DsTaPHzhXmLPZYe2skqFHnhteNW0OMtyNn40smSuArZOeD8T9Mvm9uoUdQ5aGFwwwg/GdMqA3wmYg6vyfTz2U5cHtpF9IZLZdZeOMyNKqv2jh15PW38Emshk8ZdNGgWh9Wz2Ru4jLt01lgdso= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1569696017; s=zoho; d=topbug.net; i=hong@topbug.net; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; l=1987; bh=TNnX6S5ggirD4p7iICxfc8IQpCP6oM/GyMKnGkcaNrU=; b=GLHitNdenyuRYY6uVpbhEE8fKlRFdnhI4fnuFlw+KsB/d1ZXZA+FWKy+AZFe4SLv A8aiEXIfKkGX1k6wxek2cCP2t9WFAixZzrU2qUMUo6Fl7Ijro35JMO39c5QD1BZttLw GIC20BZWXX2aDVkuaW22LbG3X6JYY3odxAmEOz+k= Original-Received: from [192.168.88.88] (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1569696016668383.2387634288623; Sat, 28 Sep 2019 11:40:16 -0700 (PDT) Openpgp: preference=signencrypt In-Reply-To: <838sq8j0vl.fsf@gnu.org> Content-Language: en-US X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167515 Archived-At: On 9/28/19 1:11 AM, Eli Zaretskii wrote: >> From: Hong Xu >> Date: Sat, 28 Sep 2019 00:59:21 -0700 >> >> * lisp/progmodes/etags.el (tags-complete-tags-table-file): Add docstring. > > Thanks. A comment below. > >> -(defun tags-complete-tags-table-file (string predicate what) ; Doc string? >> +(defun tags-complete-tags-table-file (string predicate what) >> + "Complete file names in the current tags table. >> +The meaning of the arguments are the same as the function form of >> +COLLECTION as explained in Info node `(elisp) Programmed >> +Completion'." > > The first line of the doc string should mention the arguments. And we > should explain STRING and WHAT there, because those aren't passed to > all-completions and try-completion. > Please see my update below. I'm writing in this concise form because `(elisp) Programmed Completion' has a lot of explanation and I don't think we should repeat them here. diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index a03516100087..2770baa7067c 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1843,13 +1843,18 @@ tags-query-replace delimited) (fileloop-continue)) -(defun tags-complete-tags-table-file (string predicate what) ; Doc string? +(defun tags-complete-tags-table-file (string predicate what) + "Complete STRING from file names in the current tags table. +The meaning of the arguments are the same as the function form of +COLLECTION as explained in Info node `(elisp) Programmed +Completion', except that if WHAT does not equal t, it is treated +as if it were nil." (save-excursion ;; If we need to ask for the tag table, allow that. (let ((enable-recursive-minibuffers t)) (visit-tags-table-buffer)) (if (eq what t) - (all-completions string (tags-table-files) predicate) + (all-completions string (tags-table-files) predicate) (try-completion string (tags-table-files) predicate)))) ;;;###autoload -- 2.20.1