[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: completing on makefile targets

From: Stefan Monnier
Subject: Re: completing on makefile targets
Date: Thu, 12 Sep 2019 15:41:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Why does let-binding `makefile-target-table' work in
> `sal-makefile-completions-at-point', but not in `make-compile'?

Because makefile-target-table is buffer-local, so the let-binding in
`make-compile` only affects the buffer-local value of that var.

BTW, an alternative approach is to add a pcomplete/make function which
will compute the completions for `make` (regardless if called
from`make-compile` or from, say, M-!) by looking at the Makefile in the
current directory.

> That requires knowing the "source" buffer while in the minibuffer; is
> there a standard way to get that?

I think you want `minibuffer-selected-window`


reply via email to

[Prev in Thread] Current Thread [Next in Thread]