emacs-devel
[Top][All Lists]
Advanced

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

Re: BibTeX completion via completion-in-region


From: Roland Winkler
Subject: Re: BibTeX completion via completion-in-region
Date: Sat, 5 Dec 2009 11:45:24 -0600

On Sat Dec 5 2009 Stefan Monnier wrote:
> > - You greatly shortened the code of bibtex-complete-internal by
> >   calling completion-in-region. The code calling
> >   bibtex-complete-internal assumes that this function returns the
> >   completion. This still seems to work, though completion-in-region
> >   has no documented return value. So I suggest to make the
> >   completion the documented return value of completion-in-region.
> 
> As you can see in the code, it doesn't return the completion, but yes,
> we should document that it returns a boolean.  I'll take care of it, no
> need for a bug-report.

Yet then I am still confused about what is now the proper way to
hook into the completion mechanism if one wants to perform some
post-completion processing based on the actual value of the
completion that was selected by the user.

The old BibTeX code achieved this goal in two steps, by hooking into
choose-completion-string-functions plus using the return value of
bibtex-complete-internal. (Unfortunately, I cannot recall all
details anymore under which circumstances one or the other step was
needed.) Now bibtex-complete-internal does not return the completion
anymore (because of completion-in-region) so that this step doesn't
work anymore in the old way. Is this step really not needed anymore
(and should be removed from the code)? Is it sufficient now that the
post-completion procesing is done inside choose-completion-string-functions?

For the other things, I'll submit bug reports.

Roland




reply via email to

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