GNU bug report logs - #27229
eldoc wrong highlighting for "when"

Previous Next

Package: emacs;

Reported by: "Charles A. Roelli" <charles <at> aurox.ch>

Date: Sun, 4 Jun 2017 10:21:01 UTC

Severity: minor

Tags: confirmed

Found in versions 25.2, 28.0.50

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "Charles A. Roelli" <charles <at> aurox.ch>, 27229 <at> debbugs.gnu.org
Subject: bug#27229: eldoc wrong highlighting for "when"
Date: Sun, 04 Oct 2020 01:49:23 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> "Charles A. Roelli" <charles <at> aurox.ch> writes:
>
> > From emacs -q, type "(when x y z": COND is highlighted
> > instead of BODY.  This is a regression from the behavior
> > of 24.5 (with eldoc-mode on).
>
> I can reproduce this on current master.

Seems this code is the culprit (`elisp--highlight-function-argument'):

| ;; Back to index 0 in ARG1 ARG2 ARG2 ARG3 etc...
| ;; like in `setq'.
| ((or (and (string-match-p "\\.\\.\\.\\'" argument)
|           (string= argument (car (last args-lst))))
|      (and (string-match-p "\\.\\.\\.\\'"
|                           (substring args 1 (1- (length args))))
|           (= (length (remove "..." args-lst)) 2)
|           (> index 1) (eq (logand index 1) 1)))
|  (setq index 0))

In general, the problem is that "..." can have different meanings (it's
not clear which arguments have to be repeated), so this is not trivial
to fix I think.

Michael.




This bug report was last modified 3 years and 76 days ago.

Previous Next


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