From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: change pcomplete/make to include targets in included files Date: Sat, 14 Sep 2019 15:03:09 -0700 Message-ID: <86ef0ipmci.fsf@stephe-leake.org> References: <86muf7p5w7.fsf@stephe-leake.org> <837e6byyuc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="2325"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 15 00:03:24 2019 Return-path: Envelope-to: ged-emacs-devel@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 1i9G8a-0000TK-2P for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 00:03:24 +0200 Original-Received: from localhost ([::1]:52492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9G8Y-00025h-Uw for ged-emacs-devel@m.gmane.org; Sat, 14 Sep 2019 18:03:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49806) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9G8S-00025O-BY for emacs-devel@gnu.org; Sat, 14 Sep 2019 18:03:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9G8P-0007Ix-JL for emacs-devel@gnu.org; Sat, 14 Sep 2019 18:03:15 -0400 Original-Received: from gateway23.websitewelcome.com ([192.185.49.218]:46246) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i9G8O-0007I1-7Z for emacs-devel@gnu.org; Sat, 14 Sep 2019 18:03:12 -0400 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 8AEFC4D12 for ; Sat, 14 Sep 2019 17:03:10 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 9G8Miz1Fa90on9G8Mihciu; Sat, 14 Sep 2019 17:03:10 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RAKUWX8hMiiIX1feKaXxnSdj3obrzFM8Afua1zHO4HY=; b=foXz5H6VID97zO8b4MNQwHCY1 uQmcuHr4UIPI+/5fCLb0CqafWqxTUQtHzajPjRwMvwPp2ib+38okTgL4W1ylJizhh6ASbTfGdFGds Lx4tDiBVb0ZaFmB8x2SxTa1mcLBON1pXwNjhDxYn9K6tq3vtTKoTSOG3WOXWYvYkckVDAtA1hJN0B qOH2nIrbuPW89DblEyOgl/ZbpG7bLOs7Mq1yp9EQNwwk+S20knBr8J1mUU4aKsyPx23ZKZmwr7cZ8 q+iWY1QkzswS6OUcNdTUJGlM7OeNCy4xmRiLYz6UmTz3WMLaa5vL91tTlIBNciEV4KsBNQIXqyXal VVUCcTCYw==; Original-Received: from [76.77.182.20] (port=50237 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i9G8L-002W0B-V4 for emacs-devel@gnu.org; Sat, 14 Sep 2019 16:03:10 -0600 In-Reply-To: <837e6byyuc.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Sep 2019 13:08:27 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1i9G8L-002W0B-V4 X-Source-Sender: (Takver4) [76.77.182.20]:50237 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 1 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.49.218 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240036 Archived-At: Eli Zaretskii writes: >> +*** By default, `pcomplete/make' now includes targets in included >> +files, recursively. To recover the previous behavior, set new user >> +option `pcmpl-gnu-makefile-includes' to nil. > > It is best to have the first line of a NEWS entry a complete sentence, > and leave the details for the body. (Think of a user who reads NEWS > in Outline mode). In this case, I'd rephrase the first sentence like > this: > > 'pcomplete/make' now completes on targets in included files, recursively. > > That this is the default is clear from the rest of the text. > > Also note that nowadays we prefer to quote 'like this' in NEWS and > other plain-text documentation, not `like this'. Done. > Finally, if you think this feature is worth mentioning in the manual, > please add a patch for the manual and mark the NEWS entry with "+++"; > and if you think this feature is too obscure to be in the manual, > please mark the NEWS entry with "---". I could not find a "pcomplete" section in the manual. So I will mark this with --- >> +(defcustom pcmpl-gnu-makefile-includes t >> + "If non-nil, `pcomplete/make' includes targets in included files." > > I find the "includes" part here confusing. Don't you want to say that > completion candidates will include such targets? I adapted the "completes on targets" language from the above NEWS entry. >> +(defun pcmpl-gnu-make-targets () >> + "Return a list of make targets in the current buffer." > > I'd say "makefile targets" here. If nothing else, it avoids a > sentence with confusing ambiguity ("make" is also a word that has > other meanings). Done. >> +(defun pcmpl-gnu-make-includes () >> + "Return a list of all 'include' file names in the current buffer." > > Why do we need to quote 'include' here? "include" is the 'make' keyword; when I started this, I quoted it everywhere. But then I decided "included files" was better, but missed this one. >> +(defun pcmpl-gnu-make-all-targets (makefile) >> + "Return a list of target names in MAKEFILE and all included files." > > "Return the list of target names in MAKEFILE and in all files it > includes." Done. I'll wait for more comments to post a new patch. -- -- Stephe