From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Re: electric-pair-mode as a minor mode? Date: Sat, 28 Mar 2015 23:09:26 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1427584182 1020 80.91.229.3 (28 Mar 2015 23:09:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Mar 2015 23:09:42 +0000 (UTC) Cc: Yuri D'Elia , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 29 00:09:41 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 1YbzrF-0001lH-RD for ged-emacs-devel@m.gmane.org; Sun, 29 Mar 2015 00:09:38 +0100 Original-Received: from localhost ([::1]:55468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbzrE-0005Bo-QG for ged-emacs-devel@m.gmane.org; Sat, 28 Mar 2015 19:09:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbzrB-0005BO-GZ for emacs-devel@gnu.org; Sat, 28 Mar 2015 19:09:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ybzr8-0002cU-PS for emacs-devel@gnu.org; Sat, 28 Mar 2015 19:09:33 -0400 Original-Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:38759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ybzr8-0002cQ-J0 for emacs-devel@gnu.org; Sat, 28 Mar 2015 19:09:30 -0400 Original-Received: by wibgn9 with SMTP id gn9so77005844wib.1 for ; Sat, 28 Mar 2015 16:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=sad0kNIJFfh6vcpy3qBTSguvI3OiJ6b97+/G6umzGq4=; b=BNcSS6I9C31iQFEZwyuaZLySSHNdznYIeu/0jrd8J5BeL9llRl5yHsC9fxJ57nmYaU vkSgg6JjChPRy8NkvZOFhV1pMzueECuEtWlslptrzaFzEJhmdFuY+9uNSX5yBat4Ffrj w5Fd9syBnCLdsVGi6/LN9OuhJFHnQN1WxyIrYQTcmqcxZjZH0SBFWYh4XGKHWuSBXUVL QjwpONgxFOkA7/rmzp3MLxLzQcvJx+iXq3haCY3W/+gx+RLeSACV1yGQHaCa8FZ7gInp cjEFiOPYQoRZd89i2Qu7+ny/Ttm09/wjiGr4jemGipY3v8zEoIWzS05m0Vyi3OuscilG nHdg== X-Received: by 10.194.61.161 with SMTP id q1mr50708532wjr.132.1427584169896; Sat, 28 Mar 2015 16:09:29 -0700 (PDT) Original-Received: from king.yourcompany.com (31.57.37.188.rev.vodafone.pt. [188.37.57.31]) by mx.google.com with ESMTPSA id ha10sm8915790wjc.37.2015.03.28.16.09.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Mar 2015 16:09:28 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sat, 28 Mar 2015 21:47:20 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::229 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:184492 Archived-At: joaotavora@gmail.com (Jo=C3=A3o T=C3=A1vora) writes: > Stefan Monnier writes: > >>> I like my syntax-table to understand to know as much as possible, so >>> that other commands can dwim. Perhaps I'll try a message-mode hack to >>> make blockquotes and smileys comment syntax. That should bring the 90% >>> to 99%... >> > foo far bla (blibli >> Here's my answer to that. > > I haven't tested, because I don't have time to learn about implementing Actually, I just tested, I find, even as I'm writing this message, that (modify-syntax-entry ?> "< " message-mode-syntax-table) (modify-syntax-entry ?\n "> " message-mode-syntax-table) (modify-syntax-entry ?\" "\" " message-mode-syntax-table) (add-hook 'message-mode-hook (lambda () (setq-local parse-sexp-ignore-comments t))) Works reasonably well for handling cited text. The only issue I'm seeing is that single ?> in my code snippet that is erroneously interpreted as a comment starter. Perhaps there's a way to fix that (two-char-long comment sequences?), but I find it rare enough. J