From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20385: [PATCH] Support curved quotes in doc strings Date: Fri, 22 May 2015 06:41:01 +0300 Message-ID: <555EA54D.8080307@yandex.ru> References: <1429555155-4695-1-git-send-email-eggert@cs.ucla.edu> <5552FDAC.4080004@cs.ucla.edu> <55534080.6010400@yandex.ru> <555369FD.30701@cs.ucla.edu> <5553D12F.7000809@yandex.ru> <5554155E.70000@cs.ucla.edu> <55547DC6.3090509@yandex.ru> <5555A4ED.8090500@cs.ucla.edu> <55562BB0.2010605@yandex.ru> <555640E9.4060203@cs.ucla.edu> <55564460.4020208@yandex.ru> <55566196.40105@cs.ucla.edu> <55566990.8020506@yandex.ru> <555686B7.60808@cs.ucla.edu> <55568B3E.5040704@yandex.ru> <5556A205.3040503@cs.ucla.edu> <5556FF7E.8070006@yandex.ru> <555BC6F6.8020305@cs.ucla.edu> <555BEFC8.3080307@yandex.ru> <555D8790.6030405@cs.ucla.edu> <555DACE0.8020207@yandex.ru> <555DF2B1.1070609@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1432266412 21751 80.91.229.3 (22 May 2015 03:46:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 May 2015 03:46:52 +0000 (UTC) To: Paul Eggert , 20385@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 22 05:46:41 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Yvduy-00051h-Pv for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 May 2015 05:46:40 +0200 Original-Received: from localhost ([::1]:60229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvduy-00013I-75 for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 May 2015 23:46:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvdqZ-0001PF-Ex for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 23:42:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvdqU-0000qT-PB for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 23:42:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvdqU-0000pX-L8 for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 23:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YvdqU-0000Fc-7P for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 23:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 May 2015 03:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20385 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20385-submit@debbugs.gnu.org id=B20385.1432266072906 (code B ref 20385); Fri, 22 May 2015 03:42:02 +0000 Original-Received: (at 20385) by debbugs.gnu.org; 22 May 2015 03:41:12 +0000 Original-Received: from localhost ([127.0.0.1]:52480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvdpf-0000EX-JO for submit@debbugs.gnu.org; Thu, 21 May 2015 23:41:11 -0400 Original-Received: from mail-wi0-f169.google.com ([209.85.212.169]:37505) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvdpc-0000E9-Tf for 20385@debbugs.gnu.org; Thu, 21 May 2015 23:41:10 -0400 Original-Received: by wibt6 with SMTP id t6so33735997wib.0 for <20385@debbugs.gnu.org>; Thu, 21 May 2015 20:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=WZ9X7SmdZUUtMeNwq2lCxqoNDyzQylta5UWuf9zLYws=; b=uNRty2Ys03Ew+zxXoeizWKWkAZWUr4d5wPyz1y77aDnT6cp57t2AopaMcxNizh483k 5uVFS261czL3FosJENlnkuPL21HMI6NKt38eMaDG//u7N+tMOPMLXLWTKHoPunlPf6VX o5KienB8qBtpWiwMjrrW05+tYhcYBrXL79rhG/Og9t7V1bYZ+Co44F2tkaq3CqDkqF00 yHoPjjnn34bm8IhezirM1MHORWHdI/7u8kAqMe06H2HAzxXQkcMDC7gq/E8xsES8mHy+ lZFvukoyrzQKcm0W0/com1rGehowXbsObJdRkasxBhTIPp+e+f0jifCzFDnTqkNDM2nl jrRA== X-Received: by 10.181.13.165 with SMTP id ez5mr3199368wid.77.1432266063169; Thu, 21 May 2015 20:41:03 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id gj7sm5705535wib.4.2015.05.21.20.41.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 20:41:02 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <555DF2B1.1070609@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103010 Archived-At: On 05/21/2015 05:58 PM, Paul Eggert wrote: > I originally wrote it that way, but it was harder for me to read. Two functions each doing less work is harder to read than one? > (Also slower, though that doesn't matter these days.) Still matters, but for larger inputs. Calling the quote substitution function before the keymaps-and-keys one should be fast enough, though. > How about if we rename substitute-command-keys to describe it better? > substitute-doc-string, perhaps? format-doc-string? Anyway, a rename with an obsolete-alias should work, too. > Yes, I originally wrote it in Lisp too, but found that it was too > tempting to implement complicated heuristics that would have been a pain > to document. It's up to you. I think the handling of quasiquotes isn't hard to explain in writing, but in the end those snippets of code would be better surrounded with quotes after rendering, and then the quasiquote would simply need to be escaped. > I'd rather keep the simple rules > now, even if we go back to Lisp (but why bother?). Having an Elisp implementation might be helpful if we want to apply a similar transformation via font-lock rules in the source buffers (I believe you expressed that interest). There will be some difference due to escaping, but some part might be reusable.