From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs pretest -- electric-pair-mode change Date: Wed, 02 Apr 2014 18:58:11 -0400 Message-ID: References: <87d2h0ujls.fsf_-_@kitaj.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396524220 30056 80.91.229.3 (3 Apr 2014 11:23:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 11:23:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: joaotavora@gmail.com (=?windows-1252?B?Sm/jbyBU4XZvcmE=?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 03 13:23:33 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 1WVeIv-00075K-VY for ged-emacs-devel@m.gmane.org; Thu, 03 Apr 2014 11:51:26 +0200 Original-Received: from localhost ([::1]:41119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVU77-0004m9-74 for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2014 18:58:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVU6x-0004lF-99 for emacs-devel@gnu.org; Wed, 02 Apr 2014 18:58:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVU6p-0007E6-QB for emacs-devel@gnu.org; Wed, 02 Apr 2014 18:58:23 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:50932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVU6p-0007Du-LP for emacs-devel@gnu.org; Wed, 02 Apr 2014 18:58:15 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s32MwBN7032075; Wed, 2 Apr 2014 18:58:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BD3D0602E2; Wed, 2 Apr 2014 18:58:11 -0400 (EDT) In-Reply-To: (=?windows-1252?Q?=22Jo=E3o_T=E1v?= =?windows-1252?Q?ora=22's?= message of "Wed, 02 Apr 2014 18:21:34 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4900=0 X-NAI-Spam-Version: 2.3.0.9378 : core <4900> : inlines <685> : streams <1150649> : uri <1718429> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:171263 Archived-At: > This last behaviour is also arguable but it is "way too clever", almost > buggy. The trunk's behaviour is better: it always inhibits pairing, the > surprising electric action, whenever there is unbalance, and as such is > more predictable. That makes sense. But its calling (syntax-ppss (point-max)) will result in large delays at times (since it will syntax-propertize any part of the buffer not yet propertized). Maybe it's OK because the rest of the code already causes similar delays. In many languages, strings can't span multiple lines, or they can only do so if end-of-lines are somehow escaped. Maybe we could use that to try and reduce the scope of the test. Stefan