[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27229: eldoc wrong highlighting for "when"
From: |
Michael Heerdegen |
Subject: |
bug#27229: eldoc wrong highlighting for "when" |
Date: |
Sun, 04 Oct 2020 01:49:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Kangas <stefan@marxist.se> writes:
> "Charles A. Roelli" <charles@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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#27229: eldoc wrong highlighting for "when",
Michael Heerdegen <=