"Daniel Bonniot" <[EMAIL PROTECTED]> writes: > Indeed, I overlooked testing it with emacs21. Sorry about that.
No problem. > I'm a bit confused by your patch, though. It looks like a patch > against the old version, ant it looks similar to the diff from 0.9.12 > to 0.9.13 (but I don't have the time to check precisely right now). Oops, yeah, I did accidentally supply the wrong patch. My apologies. > Could you provide a patch against the current version (in 0.9.13)? Attached. -- Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org) http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/[EMAIL PROTECTED]
--- usr/share/emacs/site-lisp/nice/nice-mode.el 2007-12-02 17:55:16.000000000 -0500 +++ /home/amu/tmp/nice-mode.el 2007-12-03 16:10:27.000000000 -0500 @@ -15,10 +15,11 @@ (eval-when-compile (require 'cc-langs) - (require 'cc-fonts)) + (require 'cc-fonts nil t)) (eval-and-compile - (c-add-language 'nice-mode 'java-mode)) + (if (fboundp 'c-add-language) + (c-add-language 'nice-mode 'java-mode))) (require 'compile) @@ -386,15 +387,21 @@ nice-link-declaration-face Face used to highlight declaration links" (interactive) + (if (not (fboundp 'c-init-language-vars)) + (c-initialize-cc-mode)) (kill-all-local-variables) - (c-initialize-cc-mode t) + (if (fboundp 'c-init-language-vars) + (c-initialize-cc-mode t)) (set-syntax-table nice-mode-syntax-table) (setq major-mode 'nice-mode mode-name "Nice" local-abbrev-table java-mode-abbrev-table) (use-local-map nice-mode-map) - (c-init-language-vars nice-mode) - (c-common-init 'nice-mode) + (if (fboundp 'c-init-language-vars) + (progn + (c-init-language-vars nice-mode) + (c-common-init 'nice-mode)) + (c-common-init)) (setq comment-start "// " comment-end "" c-conditional-key c-Nice-conditional-key

