[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/internationa
From: |
David Kastrup |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Oleh Krehel <address@hidden> 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 ‘ and ’, we obviously 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 ‘C source code’.
(quote ARG)
Return the argument, without evaluating it. ‘(quote x)’ yields ‘x’.
Warning: ‘quote’ does not construct its return value, but just returns
the value that was pre-constructed by the Lisp reader (see info node
‘(elisp)Printed Representation’).
This means that ’(a . b) is not identical to (cons ’a ’b): 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 ‘(elisp)Rearrangement’ 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 ’"&"Trailing garbage
following expression" and "void variable ’a" 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.
--
David Kastrup
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Paul Eggert, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, David Kastrup, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Oleh Krehel, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Andreas Schwab, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim,
David Kastrup <=
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Oleh Krehel, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Dmitry Gutov, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, David Kastrup, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Dmitry Gutov, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Oleh Krehel, 2015/09/03
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Dmitry Gutov, 2015/09/03
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Stefan Monnier, 2015/09/03
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Dmitry Gutov, 2015/09/03
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, Paul Eggert, 2015/09/01
- Re: [Emacs-diffs] master 9ffb6ce 5/5: Quoting fixes in lisp/international and lisp/leim, David Kastrup, 2015/09/01