emacs-devel
[Top][All Lists]
Advanced

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

Re: prettify symbols question


From: Eli Zaretskii
Subject: Re: prettify symbols question
Date: Fri, 13 Nov 2020 14:22:15 +0200

> From: "Alfred M. Szmidt" <ams@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 13 Nov 2020 06:17:36 -0500
> 
> I'm slightly confused as how to add a new coding system, do I need to
> first add a charset (the converted one would be an :ascii-compatible-p
> t, and the native nil?)?

Yes.  You will also need to prepare a mapping file, see below.  See
the example of how we define, for example, coding-systems for
MS-Windows codepages:

  (define-charset 'windows-1250
    "WINDOWS-1250 (Central Europe)"
    :short-name "WINDOWS-1250"
    :ascii-compatible-p t
    :code-space [0 255]
    :map "CP1250")

  (define-coding-system 'windows-1250
    "windows-1250 (Central European) encoding (MIME: WINDOWS-1250)"
    :coding-type 'charset
    :mnemonic ?*
    :charset-list '(windows-1250)
    :mime-charset 'windows-1250)

(The mapping files are in etc/charsets; the :map attribute of the
charset names the mapping file to use.)

> I found the manual slightly sparse on this front.

That's on purpose.  The ELisp manual says:

     How to define a coding system is an arcane matter, and is not
  documented here.



reply via email to

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