emacs-devel
[Top][All Lists]
Advanced

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

narrow-to-defun and mark-defun now work properly for CC Mode.


From: Alan Mackenzie
Subject: narrow-to-defun and mark-defun now work properly for CC Mode.
Date: 9 Apr 2007 13:18:04 +0200
Date: Mon, 9 Apr 2007 13:37:30 +0100
User-agent: Mutt/1.5.9i

Hi, Emacs!

I've patched .../lisp/progmodes/cc-{defs,langs,cmds,awk}.el in savannah
(but not yet at SourceForge) so that these two commands work properly -
up till now, they've enclosed the region between the braces; now they
enclose the entire function, including the function header.

The basic idea is to set \(beginning\|end\)-of-defun-function to the
corresponding CC Mode functions.  However, C-M-[ae] remain bound
directly to these CC Mode functions to allow optimisation for large
argument (factor ~10 in speed).

Some macros have been changed, and there are two new ones.  Here is a
recipe for recompiling CC Mode, which gets these macros compiled in the
right order:

(i) M-x byte-compile-file cc-defs.el.  M-x load-file /path/cc-defs.elc
(ii) M-x byte-compile-file cc-langs.el.  M-x load-file /path/cc-langs.elc
(iii) M-x byte-compile-file cc-engine.el.  M-x load-file ../cc-engine.elc
(iv) M-x byte-compile-file cc-mode.el.  M-x load-file ../cc-mode.elc

(v) compile and load cc-{awk,cmds}.el (no dependence on the other four files).

Please complain to me about any problems.

-- 
Alan Mackenzie (Munich, Germany)




reply via email to

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