Hello, I confirm that the patch indeed works for my work-file (which is a tad more complicated than my contrived example) Thanks, Fred On Sun, Dec 9, 2012 at 5:58 PM, Alan Mackenzie wrote: > On Fri, Dec 07, 2012 at 05:34:32AM +0100, John Smith wrote: > > Damn you. > > I *told* you that I didn't have the time & skills to look into this > further > > and you being so-nice-and-all guilt forced me into doing it :) > > > ok, so a few take-aways from giving advices to an emacs noob: > > > -on ubuntu the distribution only packages compiled lisp files so one > needs > > to add a special package to get the sources > > > -*In either case you can find it for sure with C-h f c-mode , and > > click/type CR on the file name. Then do C-x C-v to see where it is.* > > I could switch to the C-mode but never understood what "*click/type CR on > > the file name"* was supposed to mean. Anyways I found the file. > > > -the patch didn't work since the lines you removed changed a bit between > > 23.4 and HEAD, but I worked around it. > > > -like all good things there are dependencies: cc-defs.el for one and > > friends, I had to fetch them > > Sorry, I'd forgotten about the dependencies. > > > -mmh, it doesn't byte compile. actually, even vanilla unpatched file > > doesn't byte-compile: > > In c-declare-lang-variables: > > cc-engine.el:162:28:Warning: reference to free variable > > `c-lang-variable-inits' > > cc-engine.el:163:1:Error: Symbol's value as variable is void: > > c-lang-variable-inits > > > I tried commenting out that line but no such luck. > > I guess this is a trivial problem and I need to build something else but > > mmh what? I'm stuck. > > Years of devs in heaps of languages and yet I'm so helpless with this > one. > > c-lang-variable-inits is needed at compile time, and is in a different > file. It would probably be easiest at this stage just to compile the > entire CC Mode. To do this, get all the files cc-*.el (there are 17) > gunzipped, and give this at the command line (not within Emacs): > > $ emacs -Q -batch -f batch-byte-compile cc-*.el > > > Cheers and thanks for the trip. > > :-) > > > John > > -- > Alan Mackenzie (Nuremberg, Germany). >