[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13425: close this bug?
From: |
Stefan Monnier |
Subject: |
bug#13425: close this bug? |
Date: |
Sun, 29 Jan 2017 13:15:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
>> The above problem is trivially fixed with the patch below, but it seems
>> too easy, so it probably introduces problems elsewhere.
> Indeed, that causes problems with selectors that contain colons, like:
Then we need to change css-smie--forward-token and
css-smie--backward-token. Two ways to fix it:
- either make them distinguish between ", between selector" and ",
between values".
- or make them distinguish between ": for selectors" and ": for values".
Then we can change the grammar to give different precedences for the two
different cases.
E.g.
(defun css-smie--backward-token ()
[...]
(if (css--colon-inside-selector-p)
":-selector" ":"))
and then
(defconst css-smie-grammar
(smie-prec2->grammar
(smie-precs->prec2 '((assoc ";") (left ":") (assoc ",")
(left ":-selector")))))
So the question is mostly: whether it's easier to distinguish the two
different kinds of commas, or whether it's easier to distinguish the two
different kinds of colons.
Stefan