unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: completing on makefile targets
Date: Thu, 12 Sep 2019 15:41:23 -0400	[thread overview]
Message-ID: <jwv8sqtgva8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86r24l74ph.fsf@stephe-leake.org> (Stephen Leake's message of "Thu, 12 Sep 2019 11:24:42 -0700")

> 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`


        Stefan




  reply	other threads:[~2019-09-12 19:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 18:24 completing on makefile targets Stephen Leake
2019-09-12 19:41 ` Stefan Monnier [this message]
2019-09-12 21:38   ` Stephen Leake
2019-09-12 22:26     ` Stefan Monnier
2019-09-14  0:55       ` Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8sqtgva8.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).