GNU bug report logs - #14153
24.3.50; regression: `crm--choose-completion-string' expects wrong args

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 6 Apr 2013 21:30:02 UTC

Severity: minor

Found in version 24.3.50

Fixed in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 14153 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 14153 <at> debbugs.gnu.org
Subject: RE: bug#14153: 24.3.50;
	regression: `crm--choose-completion-string' expects wrong args
Date: Sat, 6 Apr 2013 19:00:57 -0700
> > Each such function should accept 4 args, as follows:
>  
> >  CHOICE - the string to insert in the buffer,
> >  BUFFER - the buffer in which the choice should be inserted,
> >  MINI-P - non-nil if BUFFER is a minibuffer, and
> >  BASE-SIZE - the number of characters in BUFFER before
> >           the string being completed.
> 
> Duh, sorry indeed, could you please update this docstring to 
> match the code?

Sorry, I don't know what the new code parameters mean.  S?he who changes the
signature is best placed to update the spec/doc of that signature.

> > But `crm--choose-completion-string' expects these args:
> >  (CHOICE  BUFFER  BASE-POSITION  &rest IGNORED)
> 
> Which is indeed the correct calling convention nowadays.

How do you deal with older code that calls with a MINI-P parameter?

It's one thing to ignore old parameters that you don't need anymore.  It's quite
another thing to change the signature so much that old calls provoke errors.

This is apparently not about some particular function such as
`crm--choose-completion-string'.  It is about
`choose-completion-string-functions', which has been around a long time and is a
general purpose hook.

Anyway, since you've changed the code, please change the doc string accordingly,
whatever that might mean/entail.  Thx.  If you really need help with the
wording, then communicate the meaning (content), and I will be glad to suggest
wording.





This bug report was last modified 11 years and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.