From: Jose A. O. R. <ja...@gn...> - 2010-05-05 13:08:25
|
Hi, c-mark-function seems to be confused by namespace. Just try to mark the function `afun' in this file: namespace foo { void afun(int a) { return; } } C-M-h will mark the whole namespace, instead of just the function. The same happens, AFAICT, with any number of functions or nested namespaces. (I'm using 5.3.18 with emacs 24). Please, let me know if you prefer a proper bug report submission. Thanks! jao |
From: Alan M. <ac...@mu...> - 2010-05-07 14:36:41
|
Hi, Jose! On Wed, May 05, 2010 at 02:14:52PM +0200, Jose A. Ortega Ruiz wrote: > Hi, > c-mark-function seems to be confused by namespace. Just try to mark the > function `afun' in this file: > namespace foo { > void afun(int a) { > return; > } > } > C-M-h will mark the whole namespace, instead of just the function. The > same happens, AFAICT, with any number of functions or nested namespaces. > (I'm using 5.3.18 with emacs 24). Yes. CC Mode's "Functions" are currently defined as outermost brace pairs + function header. This is suboptimal. This has been partly fixed in the CVS HEAD; C-M-a and C-M-e now respect "internal" functions, but C-M-h still hasn't been fixed. If you want to try this out, the CVS HEAD is available from <http://cc-mode.sourceforge.net/anoncvs.php>. > Thanks! > jao -- Alan Mackenzie (Nuremberg, Germany). |
From: Alan M. <ac...@mu...> - 2010-05-28 18:16:20
|
Hi, Jose, On Mon, May 10, 2010 at 10:44:49PM +0200, Jose A. Ortega Ruiz wrote: > Alan Mackenzie <ac...@mu...> writes: > > Hi, Jose! > [...] > > Yes. CC Mode's "Functions" are currently defined as outermost brace > > pairs + function header. This is suboptimal. > > This has been partly fixed in the CVS HEAD; C-M-a and C-M-e now respect > > "internal" functions, but C-M-h still hasn't been fixed. > > If you want to try this out, the CVS HEAD is available from > > <http://cc-mode.sourceforge.net/anoncvs.php>. > Thanks, Alan: i'll give it a try shortly. I wish i had more time, to > submit patches instead of just whining! No problem! I've just spruced up this functionality in the CVS HEAD, which should now work optimally when functions are contained within namespaces, etc. Feel free to download it from CVS HEAD (again) and try it out! > Cheers, > jao -- Alan Mackenzie (Nuremberg, Germany). |