Created attachment 703058 [details] My .emacs file that's always worked propely in the past Description of problem: I've used the same ~/.emacs file for 6 years without a problem. When I recently did a yum update of Fedora 17, my xemacs started giving me this error every time I try to edit a file: Buffer *scratch* is not a CC Mode buffer This is highly annoying because I have to get rid of the error split-window with <ctrl-x>1, and it no longer accepts my proper indenting style that's worked for many years. I since upgraded my desktop to Fedora-18. Same problem. Version-Release number of selected component (if applicable): [root@vishnu /home/bob]# rpm -qa |grep emacs xemacs-common-21.5.33-4.fc18.x86_64 xemacs-21.5.33-4.fc18.x86_64 xemacs-packages-extra-20130208-3.fc18.noarch emacs-filesystem-24.2-6.fc18.noarch xemacs-packages-base-20121228-1.fc18.noarch xemacs-filesystem-21.5.33-4.fc18.noarch How reproducible: Always Steps to Reproduce: 1. xemacs anything.c & 2. 3. Actual results: Buffer *scratch* is not a CC Mode buffer Expected results: No errors should be flagged, and my source code editing should work as it has the last six+ years. Additional info:
I recently updated the XEmacs packages because a number of bugs were fixed. This included an update to the cc-mode package. It was rather a large jump forward in cc-mode version numbers. I should not have pushed that change to F17, sorry. I did it because of all the bug fixes in other packages, and didn't realize what a big change in cc-mode it contained. Let's see if we can get your setup working, again. The new CC Mode uses a different way of setting up styles. See http://cc-mode.sourceforge.net/changes-526.php for information on that. Does adding (setq c-old-style-variable-behavior t) to your .emacs fix things for you? If not, I'm happy to figure out how to adapt your .emacs for you. Send it to me in private email if you would like me to do so.
Hi Jerry, Adding that line does NOT seem to help. My ~/.emacs is already attached to the bugzilla. :)
(In reply to comment #2) > Adding that line does NOT seem to help. My ~/.emacs is already > attached to the bugzilla. :) Oh, oops. That's what I get for reading too quickly. Okay, I'll investigate what needs to be done to get things working for you again. Sorry for the trouble.
Replace the top-level call to c-set-style (the one right above the defuns) with this: (setq c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "K&R"))) The java-mode and awk-mode settings are just to preserve the defaults. If you never edit Java or awk code, then you can drop those elements.
Incidentally, there is now a "linux" style for CC Mode, so you may be able to replace your linux-c-mode function with this: (c-set-style "linux")
Thanks, Jerry. Your suggestion in comment #4 worked perfectly.
Excellent, I'll close this bug then.