From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: change pcomplete/make to include targets in included files Date: Sun, 15 Sep 2019 16:56:00 -0400 Message-ID: References: <86muf7p5w7.fsf@stephe-leake.org> <86y2ypnxsv.fsf@stephe-leake.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="25907"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 15 22:56:50 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 1i9bZh-0006dH-R4 for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 22:56:50 +0200 Original-Received: from localhost ([::1]:57094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9bZg-0003zG-N7 for ged-emacs-devel@m.gmane.org; Sun, 15 Sep 2019 16:56:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47948) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9bZ9-0003yw-VH for emacs-devel@gnu.org; Sun, 15 Sep 2019 16:56:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9bZ7-0007lW-JS for emacs-devel@gnu.org; Sun, 15 Sep 2019 16:56:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40757) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i9bZ7-0007lB-DZ for emacs-devel@gnu.org; Sun, 15 Sep 2019 16:56:13 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5094A1008A7; Sun, 15 Sep 2019 16:56:12 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EDF0D100608; Sun, 15 Sep 2019 16:56:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1568580967; bh=SwNOoUa7SNqnybCk34novTXjFWTwdhOkbAMceF/h1/Y=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=J3sqqbJsO9J0rbhybsyH55SUAWmdBlrxQrnDC8vBO2ZbSN5y/QpO+hFyidyzVlHLc vpYcL6ZTEliCsi6+near9tJEejfpySdronXmG94iQ1Y8w2AtiRyM0LP4s4nkE8X6Xb ixmvKvPewzACbXQh9ei+P5T6kvq1ejTkCyE8x7+K8OIH7yeL/tgN8KFM2USfE49WK7 VcWXU6FHQHEPCyp84xnjQptiBSTBL4EwrgeXwxeViV9v8TVDnRIJV3cS/Pf+k12nOU RdFZUfEfX+foapefCWKa7trPObPz1TaYXJ8IiBLQwj25+8/pSk3OOM6LfpqWqLbbkX mMSgJttHksDIg== Original-Received: from alfajor (104-222-123-223.cpe.teksavvy.com [104.222.123.223]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B246A120544; Sun, 15 Sep 2019 16:56:06 -0400 (EDT) In-Reply-To: <86y2ypnxsv.fsf@stephe-leake.org> (Stephen Leake's message of "Sun, 15 Sep 2019 12:50:56 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:240055 Archived-At: > That doesn't seem to work. The list ('rules' in > pcmp-gnu-with-file-buffer) is initially nil, which means it is not > passed by reference, so it is never updated. Unless there is some way to > force pass by reference? (I think that requires a macro?) I definitely don't want to pass anything by reference (I like things to be immutable). I meant you should be doing (setq targets (pcmpl-gnu-make-all-targets ... targets)) instead of (setq targets (append (pcmpl-gnu-make-all-targets ...) targets)) it's a standard coding style in functional programming (except using recursion rather than while+setq, of course). Stefan