From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw. Date: Fri, 15 Dec 2006 16:24:20 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: dough.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1166217875 18739 80.91.229.10 (15 Dec 2006 21:24:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Dec 2006 21:24:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 15 22:24:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GvKXg-0002Qx-Og for ged-emacs-devel@m.gmane.org; Fri, 15 Dec 2006 22:24:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvKXg-0008KC-6X for ged-emacs-devel@m.gmane.org; Fri, 15 Dec 2006 16:24:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GvKXV-0008Iz-Bp for emacs-devel@gnu.org; Fri, 15 Dec 2006 16:24:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GvKXU-0008Ik-U9 for emacs-devel@gnu.org; Fri, 15 Dec 2006 16:24:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvKXU-0008Ih-QN for emacs-devel@gnu.org; Fri, 15 Dec 2006 16:24:20 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GvKXU-0001n6-ME for emacs-devel@gnu.org; Fri, 15 Dec 2006 16:24:20 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.52) id 1GvKXU-0001VE-0t; Fri, 15 Dec 2006 16:24:20 -0500 Original-To: Sean O'Rourke In-reply-to: (message from Sean O'Rourke on Thu, 14 Dec 2006 22:31:37 -0800) 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:63793 Archived-At: > Should C mode do (setq beginning-of-defun-function > 'c-beginning-of-defun) Is there any reason that would be bad? As the code currently stands, this goes into infinite recursion when c-beginning-of-defun calls beginning-of-defun (likewise for end-of-defun{,-function}). I've fixed this locally by let-binding {beginning,end}-of-defun-function, which seems like a reasonable solution (attached). Of course, this change requires implementing c-beginning-of-defun appropriately for this new design. The real question is whether it has some other bad effect.