[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18643: 25.0.50; elisp--expect-function-p
From: |
Stefan Monnier |
Subject: |
bug#18643: 25.0.50; elisp--expect-function-p |
Date: |
Thu, 09 Oct 2014 11:27:44 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> It is the false negatives that kill its usefulness in the case of elisp.
> For example, (ert-deftest |) and (defun |) no longer have the
> completions I need.
Dmitry, what is it exactly that changed?
I mean, Elisp completion has been context-sensitive "for ever", so the
change is not that it now is, but that it now reacts to the
context differently.
Oh, I think I see: the change is the introduction of
elisp--form-quoted-p such that if elisp--form-quoted-p returns nil
(and we're not expecting a function), we only complete against var names
instead of the previous behavior of expanding against "anything".
I think this is not right: we should have a elisp--expect-exp-p
which returns non-nil in a context where we know the symbol at point
should be a valid expression (i.e. a variable). Not sure how to write
it, tho, but in its absence I think we're better off completing against
"anything" than restricting ourselves to variables.
BTW, to improve on these behaviors, one approach is to take the
macro-expansion code used in elisp--local-variables and use it
"everywhere". I.e. expand elisp--local-variables so it doesn't just
return the list of local vars, but also returns whether we're inside
a quote, or we're expecting a function, or we're expecting an expression.
Stefan
- bug#18643: 25.0.50; elisp--expect-function-p, Leo Liu, 2014/10/06
- bug#18643: 25.0.50; elisp--expect-function-p, Dmitry Gutov, 2014/10/08
- bug#18643: 25.0.50; elisp--expect-function-p, Leo Liu, 2014/10/08
- bug#18643: 25.0.50; elisp--expect-function-p, Dmitry Gutov, 2014/10/09
- bug#18643: 25.0.50; elisp--expect-function-p,
Stefan Monnier <=
- bug#18643: 25.0.50; elisp--expect-function-p, Leo Liu, 2014/10/09
- bug#18643: 25.0.50; elisp--expect-function-p, Stefan Monnier, 2014/10/09
- bug#18643: 25.0.50; elisp--expect-function-p, Leo Liu, 2014/10/10
- bug#18643: 25.0.50; elisp--expect-function-p, Stefan Monnier, 2014/10/10
- bug#18643: 25.0.50; elisp--expect-function-p, Dmitry Gutov, 2014/10/10
- bug#18643: 25.0.50; elisp--expect-function-p, Leo Liu, 2014/10/10
- bug#18643: 25.0.50; elisp--expect-function-p, Stefan Monnier, 2014/10/11
- bug#18643: 25.0.50; elisp--expect-function-p, Leo Liu, 2014/10/11
- bug#18643: 25.0.50; elisp--expect-function-p, Stefan Monnier, 2014/10/14
- bug#18643: 25.0.50; elisp--expect-function-p, Dmitry Gutov, 2014/10/15