From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: change pcomplete/make to include targets in included files Date: Sat, 14 Sep 2019 13:08:27 +0300 Message-ID: <837e6byyuc.fsf@gnu.org> References: <86muf7p5w7.fsf@stephe-leake.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="122104"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 14 12:08:21 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 1i94ya-000VfE-JW for ged-emacs-devel@m.gmane.org; Sat, 14 Sep 2019 12:08:20 +0200 Original-Received: from localhost ([::1]:49164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i94yZ-0003P1-HJ for ged-emacs-devel@m.gmane.org; Sat, 14 Sep 2019 06:08:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45322) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i94yT-0003Oo-Rq for emacs-devel@gnu.org; Sat, 14 Sep 2019 06:08:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i94yT-0001kj-1U; Sat, 14 Sep 2019 06:08:13 -0400 Original-Received: from [176.228.60.248] (port=4991 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i94yQ-0002tg-7W; Sat, 14 Sep 2019 06:08:11 -0400 In-reply-to: <86muf7p5w7.fsf@stephe-leake.org> (message from Stephen Leake on Sat, 14 Sep 2019 02:46:16 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:240028 Archived-At: > From: Stephen Leake > Date: Sat, 14 Sep 2019 02:46:16 -0700 > > The patch below changes pcomplete/make to include targets in included > files. The new user option pcmpl-gnu-makefile-includes allows disabling > this. I have a couple of minor comments below, and I hope Stefan and others will provide more substantial ones, if they have them. > +*** 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'. 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 "---". > +(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? > +(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). > +(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? > +(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." Thanks.