bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27272: 25.2; [patch] Fix positional args among keyword args in eldoc


From: Thierry Volpiatto
Subject: bug#27272: 25.2; [patch] Fix positional args among keyword args in eldoc.
Date: Sun, 11 Jun 2017 10:08:29 +0200
User-agent: mu4e 0.9.19; emacs 24.5.1

Johan Bockgård <address@hidden> writes:

> Thierry Volpiatto <address@hidden> 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





reply via email to

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