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

From: Johan Bockgård <[email-masked]>
Date: Sat, 10 Jun 2017 18:15:28 +0200

Thierry Volpiatto <[email-masked]> 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)