emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ASCII-only startup message?


From: Eli Zaretskii
Subject: Re: ASCII-only startup message?
Date: Sun, 27 Dec 2015 17:56:20 +0200

> From: Paul Eggert <address@hidden>
> Date: Sat, 26 Dec 2015 17:09:49 -0800
> Cc: address@hidden
> 
> Section 6.2 of the Unicode Standard states:
> 
> U+2019 right single quotation mark is preferred where the character is to 
> represent a punctuation mark, as for contractions: “We’ve been here before.” 
> In this latter case, U+2019 is also referred to as a punctuation apostrophe. 

The Unicode recommendations should be taken with a grain of salt when
applying them to Emacs, especially for major modes which aren't
derived from Text mode.  Unicode Standard is about typesetting and
displaying plain text, it says that much in many places.  See "Plain
Text" in Chapter 2 of the standard, which says, inter alia:

  The Unicode Standard encodes plain text. The distinction between
  plain text and other forms of data in the same data stream is the
  function of a higher-level protocol and is not specified by the
  Unicode Standard itself.

Even in the passage quoted in this thread, it says "When text is set"
(with "set" meaning "typeset" here).  Whenever any markup is used, or
some other high-level protocols are applicable, Unicode (voluntarily)
takes a back seat.

The issue at hand is not with plain text, but with comments in a major
mode that supports Lisp, i.e. the text in the buffer has syntax of a
source of a program.  Text handling in such buffers has its own
high-level protocols that override Unicode recommendations where
needed.  As a trivial example, we fontify comments and strings in this
mode to have special appearances that are outside of the Unicode
scope.  As a less trivial example, evaluate the following in a buffer
under Fundamental mode:

  (insert ";; אבגדה\n")

You will see that this "Lisp comment" is displayed starting at the
right edge of the window, as prescribed by the UBA, the Unicode
Bidirectional Algorithm, which Emacs supports.  Now do the same in
*scratch* -- the comment is displayed starting at the left window edge
instead, as you'd expect for a comment, because a buffer whose mode is
for program sources overrides the UBA wrt to the "base paragraph
direction".

IOW, Emacs already behaves slightly differently in major modes that
derive from prog-mode, and therefore there's nothing inherently wrong
with deviating from plain-text related Unicode recommendations
regarding the apostrophe, quotes, etc.

So I think we should use our own judgment in this case, and what the
Unicode Standard says is not the only source of wisdom we should
consider.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]