From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim Date: Tue, 01 Sep 2015 13:22:19 +0200 Message-ID: <87vbbu4c5w.fsf@fencepost.gnu.org> References: <20150831061236.27796.57762@vcs.savannah.gnu.org> <55E3F434.2060507@yandex.ru> <55E496DC.1030608@cs.ucla.edu> <877foas9jh.fsf@gmail.com> 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 1441106553 2138 80.91.229.3 (1 Sep 2015 11:22:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2015 11:22:33 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org, Stefan Monnier , Dmitry Gutov To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 01 13:22:28 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 1ZWjdz-0005Iq-S1 for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 13:22:28 +0200 Original-Received: from localhost ([::1]:52746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWjdz-0000NA-S2 for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2015 07:22:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWjdx-0000Mu-BN for emacs-devel@gnu.org; Tue, 01 Sep 2015 07:22:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWjdw-0005wH-IE for emacs-devel@gnu.org; Tue, 01 Sep 2015 07:22:25 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:44673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWjds-0005vO-Rg; Tue, 01 Sep 2015 07:22:20 -0400 Original-Received: from localhost ([127.0.0.1]:57708 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZWjdr-0005kk-Uv; Tue, 01 Sep 2015 07:22:20 -0400 Original-Received: by lola (Postfix, from userid 1000) id 6858EE327D; Tue, 1 Sep 2015 13:22:19 +0200 (CEST) In-Reply-To: <877foas9jh.fsf@gmail.com> (Oleh Krehel's message of "Tue, 01 Sep 2015 12:45:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.10 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:189378 Archived-At: Oleh Krehel writes: > And to restate my opinion on the matter, since I haven't participated in > this discussion for a few months: Elisp code should be treated as > markup. Markup should be easy to view and enter: and since Emacs' main > language is English, the markup should be easy to enter in the most > common English keyboard layout and be easy to read in the most common > English locale. DOC strings are only marginally cooked and contain code examples. Code examples obviously contains ' and ` in their Lisp meaning. Code examples are copied&pasted into actual code. So if ` and ' are supposed to be "markup" for =E2=80=98 and =E2=80=99, we o= bviously need a markup variant for either code passages or unmolested ` and '. Has anything like that been proposed? I repeat the documentation help from the `quote' macro: quote is a special form in =E2=80=98C source code=E2=80=99. (quote ARG) Return the argument, without evaluating it. =E2=80=98(quote x)=E2=80= =99 yields =E2=80=98x=E2=80=99. Warning: =E2=80=98quote=E2=80=99 does not construct its return value, b= ut just returns the value that was pre-constructed by the Lisp reader (see info node =E2=80=98(elisp)Printed Representation=E2=80=99). This means that =E2=80=99(a . b) is not identical to (cons =E2=80=99a = =E2=80=99b): the former does not cons. Quoting should be reserved for constants that will never be modified by side-effects, unless you like self-modifying code. See the common pitfall in info node =E2=80=98(elisp)Rearrangement=E2=80= =99 for an example of unexpected results when a quoted object is modified. It contains both quote marks as well as Lisp quote characters. Executing the given examples yields "void variable =E2=80=99"&"Trailing gar= bage following expression" and "void variable =E2=80=99a" respectively. Info does not have this problem because Texinfo markup marks code passages separately, and for those, ` and ' are not substituted. So this just can't work in DOC strings until we have decided on separate markup for either ` and ' or code in general. --=20 David Kastrup