From: HARVEY S. B. 7. L. <hj...@bl...> - 2011-05-20 22:13:19
|
Alan - I couldn't anonCVS from work, but I was able to pull the current dev version from: http://cc-mode.cvs.sourceforge.net/viewvc/cc-mode/cc-mode/ (where it lets people download a .tar.gz). In any case, this version fixed the problem. Thanks! -- Harvey ----- Original Message ---- From: ac...@mu... To: HARVEY STEIN (BLOOMBERG/ 731 LEXIN) Cc: bug...@gn... At: 5/20 5:47:22 Hi, Harvey. On Thu, May 19, 2011 at 06:02:31PM -0400, HARVEY STEIN, BLOOMBERG/ 731 LEXIN wrote: > I'm having trouble with c-beginning-of-defun in a C++ file (GNU Emacs > 23.1.1 (sparc-sun-solaris2.10, X toolkit)). The code I'm viewing is > wrapped with 2 namespaces, as in: > namespace X > { > namespace Y > { > > void classname::memberfcn1(...) > { > ... > } > > void classname::memberfcn2(...) > { > ... > } > > } > } > The problem is that when I'm within a fcn, sometimes > c-beginning-of-defun backs up to the beginning of the function, > sometimes to the namespace X line, and sometimes to the namespace Y > line. Why is this, and how do I get it to only go back to the > beginning of the function? I not quite sure exactly why. There's some confusion as to whether beginning-of-defun means least-nested brace or brace at column 0. This dates from a period in history when the least-nested brace was always BOD. This is all sorted out in the upcoming 5.32 version, which I'm hoping to release in the next few months. In this version, BOD means the least nested brace _within_ any namespace, class, .... declaration. 5.32 should be stable enough for day to day use. I recommend you to download it and try it out. Instructions can be found at <http://cc-mode.sourceforge.net/anoncvs.php>; first login, then follow the directions under "Checking out the development version". The file README says how to install it. > Thanks, > Harvey All the best! -- Alan Mackenzie (Nuremberg, Germany). |