Hello,
I'm back for more help. First why aren't the 2 following expressions
equivalent:
'("\\<\\(false\\|true\\)\\>" . font-lock-constant-face)
(list (concat "\\<\\(" c++-literals "\\)\\>") '(. font-lock-constant-face))
Assume c++-literals is a variable containing the contents of the original.
Second, how do I fix the second expression to be the equivalent of the
first. Finally, what does that dot mean, I've tried looking in the
hyperspec, but no luck, I think it just acts as a kind of wildcard
placeholder, but I'm unsure.
Thanks
--
Brad Settlemyer
http://deepcopy.org/
Progamming in the trenches
Brad Settlemyer <···········@deepcopy.org> wrote in message
························@news1.east.cox.net...
> Hello,
> I'm back for more help. First why aren't the 2 following expressions
> equivalent:
>
> '("\\<\\(false\\|true\\)\\>" . font-lock-constant-face)
>
> (list (concat "\\<\\(" c++-literals "\\)\\>") '(.
font-lock-constant-face))
>
> Assume c++-literals is a variable containing the contents of the original.
> Second, how do I fix the second expression to be the equivalent of the
> first. Finally, what does that dot mean, I've tried looking in the
> hyperspec, but no luck, I think it just acts as a kind of wildcard
> placeholder, but I'm unsure.
Try CONS instead of LIST
(cons (concat "\\<\\(" c++-literals "\\)\\>") 'font-lock-constant-face))
The dot notation is for representing the car and cdr of a cons. You don't
see it in a proper list because the cdr is another list:
CL-USER 4 : 1 > (cons 'a 'b)
(A . B)
CL-USER 5 : 1 > (cons 'a '(b c))
(A B C)
CL-USER 6 : 1 > '(a . (b . (c)))
(A B C)
--
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")