[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change pcomplete/make to include targets in included files
From: |
Stefan Monnier |
Subject: |
Re: change pcomplete/make to include targets in included files |
Date: |
Sun, 15 Sep 2019 16:56:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> 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