[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c-mark-function goes too far
From: |
Pete Klammer |
Subject: |
c-mark-function goes too far |
Date: |
Sat, 6 Jan 2007 19:24:13 -0700 |
In certain cases, `M-C-h' (`c-mark-function') goes too far.
The bottom (mark) is placed at end-of-buffer, if my function looks like this
...
void myfunction( void ) {
mychar = getch() ;
}
... But if it looks like this, mark is correctly placed after the closing
brace:
void myfunction( void )
{
mychar = getch() ;
}
I have my C style set to 'k&r', and all automatic indenting, and even M-C-\
region indenting, is doing as I like. I suppose putting the opening
function-block brace up on the same line as the function declaration may not
be pure k&r... However, syntactic analysis (C-c C-s) of the closing brace
shows the same information in either case, and besides, it's consistent with
k&r while() and do etc. brace positioning. So why doesn't c-mark-function
recognize the defun-close and put the mark there?
--
Peter F. Klammer, P.E.
NETRONICS Professional Engineering, Inc.
3200 Routt Street
Wheat Ridge, Colorado 80033-5452
(303)915-2673 (Wireless w/voicemail)
(303)274-6182 (w/voicemail and FAX)
Mailto:PKlammer@NETRONICS-PE.com
"Net:Working Programmable Electronics!"
- c-mark-function goes too far,
Pete Klammer <=