[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19250: elisp-mode.el: completion-at-point fails at M-: for some buff
From: |
Stefan Monnier |
Subject: |
bug#19250: elisp-mode.el: completion-at-point fails at M-: for some buffers |
Date: |
Wed, 03 Dec 2014 13:23:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> This seems to happen because elisp--local-variables tries to
> gather variable names for completion from the contents of the
> buffer M-: is invoked from, while such buffer does not
> necessarily hold any (valid) Emacs Lisp code.
Indeed we have two bugs: we gather the local vars from the wrong buffer,
and we don't ignore invalid-read-syntax errors (which can happen in
various other legitimate cases).
The second bug is trivial to fix, the first is a bit more delicate
because the buffer-switching is done by completion-table-dynamic and I'm
pretty sure it's done for a good reason (i.e. while it's undesirable
here, it's desirable in some other case(s)), so we'll first have to
figure out which are those other cases and how to fix this case
without breaking those others.
Stefan