From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pete Klammer" Newsgroups: gmane.emacs.bugs Subject: c-mark-function goes too far Date: Sat, 6 Jan 2007 19:24:13 -0700 Organization: NETRONICS Professional Engineering, Inc. Message-ID: <000c01c73202$ec8e9880$6506a8c0@fountain> Reply-To: PKlammer@NETRONICS-PE.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168156220 17416 80.91.229.12 (7 Jan 2007 07:50:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2007 07:50:20 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 07 08:50:18 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H3SnK-0004Zt-3e for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jan 2007 08:50:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3SnJ-0007Bl-Jy for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jan 2007 02:50:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H3NiB-0005jV-CQ for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2007 21:24:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H3Ni8-0005ic-LS for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2007 21:24:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H3Ni8-0005iZ-GN for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2007 21:24:36 -0500 Original-Received: from [204.127.200.81] (helo=sccrmhc11.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H3Ni8-0002Uc-8I for bug-gnu-emacs@gnu.org; Sat, 06 Jan 2007 21:24:36 -0500 Original-Received: from fountain (c-24-8-231-170.hsd1.co.comcast.net[24.8.231.170]) by comcast.net (sccrmhc11) with SMTP id <2007010702243001100pmik7e>; Sun, 7 Jan 2007 02:24:30 +0000 Original-To: X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: AccxISFJEtJRWkHdQmmKlgzYRnaf7AA4XEAA X-Mailman-Approved-At: Sun, 07 Jan 2007 02:50:16 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15512 Archived-At: 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!"