bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interac


From: John Smith
Subject: bug#13046: 23.4; Minimal Example to freeze emacs C++ mode (nasty interaction between templates & windows endline characters )
Date: Fri, 7 Dec 2012 05:34:32 +0100

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 <ret>, 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

-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.

Cheers and thanks for the trip.
John



On Wed, Dec 5, 2012 at 9:10 PM, Alan Mackenzie <acm@muc.de> wrote:
Hello, John.

On Mon, Dec 03, 2012 at 09:54:51AM +0100, John Smith wrote:
> Hello all,

> I'm afraid my limited emacs knowledge will not allow me to test the patch.
> (Building fresh from source + patching the lisp => too much :) )
> I trust however that it does!

If you want to test the patch, here's how to go about it:
(i) Make sure you've got the program `patch' installed - it's in package
"diffutils".  (I don't know the package manager in Ubuntu).

(ii) Extract my email containing the patch to a file, say foo.diff.  You
don't need to bother separating out the actual patch from all the other
stuff.

(iii) Locate cc-engine.el.  It will be somewhere like
/usr/local/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you
installed Emacs from source, or
/usr/share/emacs/24.2/lisp/progmodes/cc-engine.el.gz if you installed
Emacs from a package manager.  In either case you can find it for sure with
C-h f c-mode <ret>, and click/type CR on the file name.  Then do C-x C-v
to see where it is.

(iv) Unzip the source file: cd <above directory>; gunzip cc-engine.el.gz

(v) Patch that file: patch < /path/to/foo.diff

(vi) Byte compile the file: (in emacs)
M-x byte-compile-file <ret> /path/to/cc-engine.el

(vii) Load the file (or restart Emacs):
M-x load-file /path/to/cc-engine.elc
(note the 'c' at the end of ".elc")

(viii) Advisable: gunzip, byte compile, and load cc-cmds.el.gz too.
This is because it uses the "defsubst" (inline function) changed in
cc-engine.el.

> Thanks for being so responsive.

Thank you for such a high quality bug report.

> Yours Sincerely,
> John

--
Alan Mackenzie (Nuremberg, Germany).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]