From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: A Soare Newsgroups: gmane.emacs.devel Subject: - c-end-of-defun - ! Date: Wed, 18 Apr 2007 15:17:00 +0200 (CEST) Message-ID: <20935145.311971176902220543.JavaMail.www@wwinf4104> Reply-To: alinsoar@voila.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1176902236 10628 80.91.229.12 (18 Apr 2007 13:17:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Apr 2007 13:17:16 +0000 (UTC) To: "Emacs Dev [emacs-devel]" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 18 15:17:10 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HeA1z-0005Yz-37 for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2007 15:17:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeA6o-0007dJ-Nn for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2007 09:22:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HeA6l-0007by-An for emacs-devel@gnu.org; Wed, 18 Apr 2007 09:22:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HeA6k-0007aW-Eu for emacs-devel@gnu.org; Wed, 18 Apr 2007 09:22:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeA6k-0007aH-9A for emacs-devel@gnu.org; Wed, 18 Apr 2007 09:22:02 -0400 Original-Received: from smtp2.voila.fr ([193.252.22.175] helo=smtp1.voila.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HeA1t-0006Kf-OF for emacs-devel@gnu.org; Wed, 18 Apr 2007 09:17:01 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4102.voila.fr (SMTP Server) with ESMTP id 980381C00295 for ; Wed, 18 Apr 2007 15:17:00 +0200 (CEST) Original-Received: from wwinf4104 (wwinf4104 [172.22.152.31]) by mwinf4102.voila.fr (SMTP Server) with ESMTP id 8BFEE1C0028F for ; Wed, 18 Apr 2007 15:17:00 +0200 (CEST) X-ME-UUID: 20070418131700573.8BFEE1C0028F@mwinf4102.voila.fr X-Originating-IP: [89.34.170.37] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-REPLYTO: |~| X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69564 Archived-At: int function (void) { int b; } struct ONE function (void) { int a; } struct TWO function (void) { int a; } Here are 3 valid functions written in C. Copy them into a buffer in C-MODE, and eval (end-of defun) in the first one and in the second. In the second case => FAIL. That is because of this code in c-end-of-defun: ;; Do we need to move forward from the brace to the semicolon? (when (eq arg 0) (if (c-in-function-trailer-p) ; after "}" of struct/enum, etc. (c-syntactic-re-search-forward ";")) (c-in-function-trailer-p) in our case MUST return NULL. Not the (point). Is really need to call (c-syntactic-re-search-forward ";") here? Alin Soare.