GNU bug report logs - #27272
25.2; [patch] Fix positional args among keyword args in eldoc.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Wed, 7 Jun 2017 09:32:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.2

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Johan Bockgård <bojohan <at> gnu.org>
Cc: 27272 <at> debbugs.gnu.org
Subject: bug#27272: 25.2; [patch] Fix positional args among keyword args in eldoc.
Date: Sun, 11 Jun 2017 10:08:29 +0200
Johan Bockgård <bojohan <at> gnu.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> Fix eldoc with positional arg among keyword args.
>>
>> * lisp/progmodes/elisp-mode.el (elisp--highlight-function-argument):
>> Switch to indexed arg searching when no keyword found behind arg.
>
> This code is wrong both with and without your fix. All mandatory and
> optional arguments should be used *before* keywords are matched.
>
> Given this definition of `foo',
>
>     (cl-defun foo (x &key a b c)
>       (list x a b c))
>
> `:b' in the following call specifies the positional argument `x', not
> the keyword argument `b':
>
>     (foo :b :a 1)  =>  (:b 1 nil nil)

Fixed as well.

Thanks.

-- 
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8  5FC2 28D1 7F53 59F2 9997




This bug report was last modified 8 years and 1 day ago.

Previous Next


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