Hi Alan, We're getting to the last few remaining ELisp files in Emacs still using the old non-lexical dialect, so I looked at converting CC-mode to use the new dialect as well. AFAICT the code is basically already prepared for that, tho I did find some minor things in the patch below. Of course, the change should be fully backward compatible (i.e. the code sticks to the common subset of the two dialects). See below the result of my attempt in the form of 4 patches. 0001 and 0004 are the important ones. 0002 makes the code more regular (you already use `declare` at various places, so I think it's good to use it more systematically). 0003 is largely a question of taste (and we know we don't always agree on that), but I like the warnings it gives me when a function is marked obsolete or when I make a typo. As usual, take the parts you like, Stefan