From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagnostics Date: Tue, 25 Aug 2015 19:51:33 -0700 Organization: UCLA Computer Science Department Message-ID: <55DD29B5.8020801@cs.ucla.edu> References: <20150816160149.9416.80132@vcs.savannah.gnu.org> <55D1043C.3030909@yandex.ru> <55D15899.2070105@cs.ucla.edu> <55D1C9CE.2060407@yandex.ru> <55D20EDF.5070906@cs.ucla.edu> <55D223CA.4080109@yandex.ru> <55D22A1F.8040508@cs.ucla.edu> <55D22CF4.9030608@yandex.ru> <55D2747D.10809@cs.ucla.edu> <55D317A9.6000805@yandex.ru> <55D42210.9070703@cs.ucla.edu> <55D48503.3020406@yandex.ru> <55D50159.2030104@cs.ucla.edu> <55D5DC52.9020709@cs.ucla.edu> <55D7B881.9000201@yandex.ru> <55D7C014.7070808@cs.ucla.edu> <55D86ECE.2070504@yandex.ru> <55DB5583.8050400@cs.ucla.edu> <55DC153D.2090102@cs.ucla.edu> <55DC53C7.80205@yandex.ru> <55DCADFD.5050606@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: quoted-printable X-Trace: ger.gmane.org 1440557517 15112 80.91.229.3 (26 Aug 2015 02:51:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Aug 2015 02:51:57 +0000 (UTC) Cc: emacs-devel@gnu.org, Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 26 04:51:48 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 1ZUQoV-0003DJ-0R for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2015 04:51:47 +0200 Original-Received: from localhost ([::1]:35823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUQoT-0008Hx-W5 for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 22:51:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUQoR-0008Hh-9S for emacs-devel@gnu.org; Tue, 25 Aug 2015 22:51:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUQoK-0006u1-MI for emacs-devel@gnu.org; Tue, 25 Aug 2015 22:51:43 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUQoK-0006tl-Gq for emacs-devel@gnu.org; Tue, 25 Aug 2015 22:51:36 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2F085160F3B; Tue, 25 Aug 2015 19:51:35 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YJ8uQlFB55PZ; Tue, 25 Aug 2015 19:51:34 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6EA2B160F3E; Tue, 25 Aug 2015 19:51:34 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sXgMx79CjBGT; Tue, 25 Aug 2015 19:51:34 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3FBD9160F3B; Tue, 25 Aug 2015 19:51:34 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:189185 Archived-At: Stefan Monnier wrote: > IOW, we don't need format-message at all. Instead we can just have > a "prettify" function which can be used on the output of `format' (or o= n > any other string we like) and which uses some heuristic to turn `...' > into its =E2=80=98...=E2=80=99 equivalent. I had already put something along those lines in master (the prettify fun= ction's=20 name was =E2=80=98internal--text-restyle=E2=80=99), but despite hacking a= round with it for a=20 while I didn=E2=80=99t find a good independent use for it. Every use was of the form (format (prettify STRING) ARGS). The prettify=20 function wasn't useful as postpass to =E2=80=98format=E2=80=99 because th= at would have typically=20 mishandled examples like (prettify (format "Invalid `%s'" xxx)) where XXX= =20 contains quotes. Nor was it useful as a prepass or postpass to=20 =E2=80=98substitute-command-keys=E2=80=99, for similar reasons. Plus, even with prettify split out, we need a format-message function any= way, if=20 only as a convenience, because it's so often needed in examples like (app= ly=20 #'format-message fmt args). Since there was a demonstrated need for=20 format-message but not for prettify (and before reading your abovequoted = email)=20 I redid the code to export the former and not the latter. The new=20 implementation avoids burdening the GC with two copies of the string, whi= ch is a=20 minor performance win. If there's a use case for the prettify function I'll be happy to resurrec= t it,=20 of course.