unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Alfred M. Szmidt" <ams@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: prettify symbols question
Date: Fri, 13 Nov 2020 14:22:15 +0200	[thread overview]
Message-ID: <83y2j5wio8.fsf@gnu.org> (raw)
In-Reply-To: <E1kdX5E-0002RO-KO@fencepost.gnu.org> (ams@gnu.org)

> 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	other threads:[~2020-11-13 12:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 17:01 prettify symbols question Alfred M. Szmidt
2020-11-12 14:59 ` Eli Zaretskii
2020-11-12 15:17   ` Alfred M. Szmidt
2020-11-12 15:38     ` Eli Zaretskii
2020-11-12 16:14       ` Eli Zaretskii
2020-11-12 20:53         ` Alfred M. Szmidt
2020-11-12 21:12           ` Basil L. Contovounesios
2020-11-12 21:25             ` Drew Adams
2020-11-13  7:44             ` Eli Zaretskii
2020-11-13  7:24           ` Eli Zaretskii
2020-11-13 10:15             ` Alfred M. Szmidt
2020-11-13 11:17             ` Alfred M. Szmidt
2020-11-13 12:22               ` Eli Zaretskii [this message]
2020-11-13 13:31                 ` Alfred M. Szmidt
2020-11-13 13:47                   ` Eli Zaretskii
2020-11-13 14:47                     ` new coding system (was: Re: prettify symbols question) Alfred M. Szmidt
2020-11-13 14:59                       ` Eli Zaretskii
2020-11-13 17:11                         ` Alfred M. Szmidt
2020-11-14 14:24                           ` Eli Zaretskii
2020-11-14 15:29                             ` Alfred M. Szmidt
2020-11-14 16:19                               ` Eli Zaretskii
2020-11-23 20:40                                 ` Alfred M. Szmidt
2020-11-23 20:49                                   ` Eli Zaretskii
2020-11-28 17:27                                     ` Alfred M. Szmidt
2020-11-13 17:11                         ` Alfred M. Szmidt
2020-11-13 17:32                       ` new coding system Andreas Schwab
2020-11-13 17:36                         ` Alfred M. Szmidt
2020-11-13  8:27       ` prettify symbols question Alfred M. Szmidt
2020-11-13  8:40         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y2j5wio8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=ams@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).