From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw. Date: 14 Dec 2006 19:29:03 +0100 Message-ID: <20061214193937.GB1269@muc.de> References: <45768797.5010106@gmx.at> <87odqhj89q.fsf@stupidchicken.com> <20061210014526.GB3738@muc.de> <877ix0lfm8.fsf@furball.mit.edu> <20061210102249.GA1235@muc.de> <87d56rpk7a.fsf@stupidchicken.com> <20061213224009.GA1206@muc.de> <45812B42.6010501@gmx.at> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1166120965 17692 80.91.229.10 (14 Dec 2006 18:29:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2006 18:29:25 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org, Richard Stallman , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 14 19:29:24 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 1GuvKZ-0001gZ-TO for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2006 19:29:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuvKZ-0002pK-IB for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2006 13:29:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuvKN-0002oz-2F for emacs-devel@gnu.org; Thu, 14 Dec 2006 13:29:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuvKM-0002od-Fz for emacs-devel@gnu.org; Thu, 14 Dec 2006 13:29:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuvKM-0002oY-Bw for emacs-devel@gnu.org; Thu, 14 Dec 2006 13:29:06 -0500 Original-Received: from [193.149.48.1] (helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GuvKL-000130-Dv for emacs-devel@gnu.org; Thu, 14 Dec 2006 13:29:05 -0500 Original-Received: (qmail 71736 invoked by uid 3782); 14 Dec 2006 18:29:03 -0000 Original-Received: from acm.muc.de (p54A3E86F.dip.t-dialin.net [84.163.232.111]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 14 Dec 2006 19:29:01 +0100 (CET) Original-Received: (qmail 2055 invoked by uid 1000); 14 Dec 2006 19:39:38 -0000 Original-Date: Thu, 14 Dec 2006 19:39:38 +0000 Original-To: martin rudalics Content-Disposition: inline In-Reply-To: <45812B42.6010501@gmx.at> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) X-Primary-Address: acm@muc.de 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:63733 Archived-At: On Thu, Dec 14, 2006 at 11:45:22AM +0100, martin rudalics wrote: > beginning-of-defun's > > (and (beginning-of-defun-raw arg) > (progn (beginning-of-line) t))) > > might still spoil everything with a construct like > > (foo > ...) (bar ...) > > and point after "bar". Maybe you should try > > (and (prog1 (beginning-of-defun-raw arg) > (when open-paren-in-column-0-is-defun-start > (beginning-of-line))))) Or only move to BOL when there's only whitespace between BOL and (bar. > instead. -- Alan.