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: electric-pair-mode as a minor mode? Date: Sun, 29 Mar 2015 20:54:39 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427676908 24369 80.91.229.3 (30 Mar 2015 00:55:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Mar 2015 00:55:08 +0000 (UTC) Cc: Yuri D'Elia , 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 Mon Mar 30 02:55:01 2015 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 1YcNyj-0001m7-3V for ged-emacs-devel@m.gmane.org; Mon, 30 Mar 2015 02:54:57 +0200 Original-Received: from localhost ([::1]:58783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcNyc-0002c8-UJ for ged-emacs-devel@m.gmane.org; Sun, 29 Mar 2015 20:54:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcNyZ-0002c3-T9 for emacs-devel@gnu.org; Sun, 29 Mar 2015 20:54:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcNyV-0003Vb-TT for emacs-devel@gnu.org; Sun, 29 Mar 2015 20:54:47 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcNyV-0003Uv-PO for emacs-devel@gnu.org; Sun, 29 Mar 2015 20:54:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRBbthL/2dsb2JhbAAxBoFToW+BCIF1AQEEAVYjBQsLNBIUGA2IN6IRiUqCKCQSPAwDgz4Dg3AEqDs X-IPAS-Result: AgUFAGvvdVRBbthL/2dsb2JhbAAxBoFToW+BCIF1AQEEAVYjBQsLNBIUGA2IN6IRiUqCKCQSPAwDgz4Dg3AEqDs X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="114908716" Original-Received: from 65-110-216-75.cpe.pppoe.ca (HELO pastel.home) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Mar 2015 20:54:43 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BFEC8DB0; Sun, 29 Mar 2015 20:54:39 -0400 (EDT) In-Reply-To: (=?windows-1252?Q?=22Jo=E3o_T=E1vo?= =?windows-1252?Q?ra=22's?= message of "Sun, 29 Mar 2015 21:41:30 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:184531 Archived-At: > could go somewhere into lisp/message.el if it weren't so fragile: the > comment syntax could change according to `message-yank-cited-prefix' and > also I has to be a comment only if it starts in the first column... > Do you follow? Know any way to handle these cases? I guess you'd have to use syntax-propertize-function to catch&handle the "unusual cases". > Yes, yes and yes. Of course in natural languages there's no compiler > formally telling you the message is unsyntactic, but I personally will > go for a tool that gets it right almost everytime (some value between > 90% and 100%), as long as the price when it gets it wrong is not too > high. And simple syntax changes to help the syntax-ppss heuristic are > the low-hanging fruit. Agreed. BTW, someone has written some syntax-propertize-function code to "neutralize" the smileys, along the same ideas. Can't remember where it was discussed, tho, maybe gnu.emacs.help. > Not suprising considering that brings back precisely your old > implementation :-) Ah, well, then this should work brilliantly, obviously, Stefan