Version: (using KDE KDE 3.5.3) Installed from: Debian testing/unstable Packages OS: Linux Hi, I'm filing this against kde because I couldn't find a more apropriate place. The kde-emacs scripts uses c-narrow-out-enclosing-class which is not available in the latest stable version of cc-mode anymore. I don't know how other people install emacs, but at least the Debian packages of emacs snapshots contain such a recent version of cc-mode. If this isn't obvious: The missing function makes the indentation impossible, i.e. I can't indent anything in a KDE source file. I already talked to the cc-mode people on their help-list and I was told by Alan Mackenzie that if you need assistance with this you could contact him on bug-cc-mode@gnu.org I hope this can be fixed at least for KDE 3.5.5 (as I guess it's a bit too late for 3.5.4, IIRC the tagging is tomorrow) Andreas
Hi, I was notified in the discussion on cc-mode-help (sorry still not in the archive of sourceforge.net) that the mentioned c-narrow.. function is actually not supposed to be used outside of cc-mode, i.e. it is not part of the "public API". So this should be definetly fixed, especially with the long lifetime of KDE3.5 in mind. Andreas
I'm experiencing this too with emacs 22.2.1
For testing, does it help if you replace the 30 with 31 in kde-emacs-core.el around line 186? [talking about trunk here, not 3.5 branch] The "new" stuff was only enabled for c-version 5.30.* instead of >= 5.30.
Changing the line to ((string-match "^5\\.31\\." c-version) indeed seems to fix the problem. Not committed, since it does not look like the real fix, though.
Does this work too? --- kde-emacs-core.el (revision 837649) +++ kde-emacs-core.el (working copy) @@ -180,7 +180,7 @@ With arg, do it arg times." ;; If you don't have 5.30 comment out the following c-guess-basic-syntax ;; and uncomment the one underneath. (cond - ((string-match "^5\\.30\\." c-version) + ((>= (string-to-number c-version) 5.30) (defun c-guess-basic-syntax () "Return the syntactic context of the current line. This function does not do any hidden buffer changes."
This is biting me now too. I'm running OpenSUSE 11, with emacs-23.0.60_cvs20080905-1.1 and CC Mode version 5.31.6. I'm also seeing... let*: Symbol's function definition is void: c-narrow-out-enclosing-class ... when I hit <Tab> at the beginning of a line to indent. Also, I tried changing the string-match to 5\\.31\\. as well as the change dfaure mentioned in comment #5 and neither of them fixed this problem for me.
Ugh. This is also happening when I hit "{". So I'm now unable to use the <Tab> or "{" keys editing files. Is there any chance someone could look at this? I understand that xemacs doesn't have this problem and Zack and David use xemacs, but this is really annoying and makes emacs + our kde scripts totally useless. =:((
I, of course, use GNU/Emacs, not XEmacs, I just didn't have time to even look at this bug because the cc-mode parser completely changed in 5.31. Really someone with a little bit of time needs to talk to cc-engine developers so that we can figure out how to handle signals/slots/Q_OBJECT/Q_PROPERTY stuff... In the mean time I committed a hack that disables that code and at least lets you work (it's what I've done locally).
Zack: Ahh, so glad to hear that! You'll have to talk with Thiago about besmirching your good emacs-using name. =;D Thank you SO much for committing this. I know it's only a hack/short-term solution, but I really appreciate it, since I can now use emacs again. Thanks very much!!!
I don't think this thing exists anymore.
Actually kde-dev-scripts/kde-emacs still exists (but I stopped using it years ago). The last person to touch it was akarsh@kde.org in 2016. Unless he reacts to this bug, I guess we should delete kde-emacs as it's unmaintained.