all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* c-mark-function goes too far
@ 2007-01-07  2:24 Pete Klammer
  2007-01-07 23:31 ` Eric Hanchrow
       [not found] ` <mailman.2837.1168213818.2155.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Pete Klammer @ 2007-01-07  2:24 UTC (permalink / raw)


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!"

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-11  5:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-07  2:24 c-mark-function goes too far Pete Klammer
2007-01-07 23:31 ` Eric Hanchrow
     [not found] ` <mailman.2837.1168213818.2155.bug-gnu-emacs@gnu.org>
2007-01-09 23:53   ` Miles Bader
2007-01-10 18:46     ` Richard Stallman
2007-01-10 20:44       ` Alan Mackenzie
2007-01-11  4:55         ` Miles Bader
2007-01-11  5:10         ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.