From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin. Date: Wed, 15 Oct 2014 23:38:07 +0100 Message-ID: <86a94xrmb4.fsf@gmail.com> References: <20141011134312.GA4148@acm.acm> <20141012100416.GC3148@acm.acm> <20141015091208.GA3093@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1413412740 5748 80.91.229.3 (15 Oct 2014 22:39:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2014 22:39:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 16 00:38:53 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XeXDX-0006Qa-6n for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 00:38:51 +0200 Original-Received: from localhost ([::1]:47187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXDW-0006yV-Ii for ged-emacs-devel@m.gmane.org; Wed, 15 Oct 2014 18:38:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXDL-0006oX-Ep for emacs-devel@gnu.org; Wed, 15 Oct 2014 18:38:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeXDD-0002im-VM for emacs-devel@gnu.org; Wed, 15 Oct 2014 18:38:39 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:47186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXDD-0002iP-Oq for emacs-devel@gnu.org; Wed, 15 Oct 2014 18:38:31 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XeXD9-0006Ad-4C for emacs-devel@gnu.org; Thu, 16 Oct 2014 00:38:27 +0200 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Oct 2014 00:38:27 +0200 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Oct 2014 00:38:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:eo9vc4sC0yaw0YNhUZR7tUjleVk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175435 Archived-At: On Wed 15 Oct 2014, Alan Mackenzie wrote: > Sorry, I expressed myself really badly. I'll try again. Dividing a > source file line into LH periphery, core, RH periphery: > > foo = /* */ bar; /* comment */ > PPPPPPPPPPPP PPPPPPPPPPPPPP > CCCCCCCCCCCCCCCC > > The periphery of a line does not extend outside that line. An "internal > comment" inside a line (a fairly rare thing) is not part of the > periphery. Comments before the core are vanishingly rare, hence not > included in the definition. > > The candidates for a pertinent parenthesis are then: > (i) A paren that point is immediately outside of. A closing paren takes > priority over an opening one. (This is the existing implementation.) > (ii) (Only when point is in the periphery) a paren at the beginning or > end of the core. The one nearest point takes priority. So if understand correctly, LH periphery is leading whitespace/comments, and RH periphery is trailing whitespace/comments ? AndyM