From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: prettify symbols question Date: Fri, 13 Nov 2020 08:31:42 -0500 Message-ID: References: <834kluzkma.fsf@gnu.org> <831rgyziu3.fsf@gnu.org> <83zh3my2ls.fsf@gnu.org> <83o8k1yb0x.fsf@gnu.org> <83y2j5wio8.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 13 14:32:55 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 1kdZCA-000621-VC for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 14:32:54 +0100 Original-Received: from localhost ([::1]:44490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdZCA-0000h5-29 for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Nov 2020 08:32:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdZB1-0008Bl-9O for emacs-devel@gnu.org; Fri, 13 Nov 2020 08:31:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59136) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdZB0-00070R-Ub for emacs-devel@gnu.org; Fri, 13 Nov 2020 08:31:42 -0500 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1kdZB0-0003JC-5z; Fri, 13 Nov 2020 08:31:42 -0500 In-Reply-To: <83y2j5wio8.fsf@gnu.org> (message from Eli Zaretskii on Fri, 13 Nov 2020 14:22:15 +0200) 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:259136 Archived-At: > 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: (The mapping files are in etc/charsets; the :map attribute of the charset names the mapping file to use.) Which are generated from the admin/charsets files, which in turn sometimes pulled in from glibc. So the easiest route is to add a LISPM like charset mapping following glibc (and then also see if it can be included there). And then do, (define-charset 'lispm "LISPM" :short-name "LISPM" :ascii-compatible-p nil :code-space [0 255] :map "LISPM") (define-coding-system 'lispm "Lisp Machine encoding" :coding-type 'charset :mnemonic ?L :charset-list '(lispm)) So that sorts it out for the native one, but what should be done for the Unix friendly mapping? LISPM-ASCII, and similar as above?