From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: prettify symbols question Date: Fri, 13 Nov 2020 14:22:15 +0200 Message-ID: <83y2j5wio8.fsf@gnu.org> References: <834kluzkma.fsf@gnu.org> <831rgyziu3.fsf@gnu.org> <83zh3my2ls.fsf@gnu.org> <83o8k1yb0x.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38541"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: "Alfred M. Szmidt" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 13 13:23:18 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdY6o-0009uz-QX for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 13:23:18 +0100 Original-Received: from localhost ([::1]:46866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdY6n-0004On-KF for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 07:23:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdY66-0003vO-1k for emacs-devel@gnu.org; Fri, 13 Nov 2020 07:22:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54838) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdY65-0007ls-Pc for emacs-devel@gnu.org; Fri, 13 Nov 2020 07:22:33 -0500 Original-Received: from [176.228.60.248] (port=4730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kdY63-0002Cd-Ny; Fri, 13 Nov 2020 07:22:32 -0500 In-Reply-To: (ams@gnu.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259130 Archived-At: > From: "Alfred M. Szmidt" > 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.