* codepage-setup, autoload cpNNN
@ 2005-08-04 17:57 Reiner Steib
2005-08-04 18:44 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2005-08-04 17:57 UTC (permalink / raw)
[ From `bug-gnu-emacs'...]
Eli Zaretskii wrote:
> The node you quoted is from an appendix that describes the MS-DOS port
> of Emacs, which uses codepage.el. On other systems, Emacs uses a
> different implementation of code pages, the one from code-pages.el.
On GNU/Linux, Emacs autoloads window-12xx. I.e. if Gnus displays an
article with charset=window-12xx, all characters are displayed
correctly. Sometimes people use charset=cp850 or need to edit files
encoded in cpNNN. After `M-x codepages-setup RET NNN RET' the coding
system is available. But etc/NEWS says "`codepage-setup' is now
obsolete". What is the correct way to setup cpNNN?
Does it make sense to add autoload statements like this (in
`codepage.el'?)?
(autoload-coding-system 'cpNNN '(codepage-setup NNN))
Or maybe do it for all supported codepages:
(mapc (lambda (cp)
(setq cp (string-to-number (car cp)))
(autoload-coding-system (intern (format "cp%s" cp))
`(codepage-setup ,cp)))
(cp-supported-codepages))
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: codepage-setup, autoload cpNNN
2005-08-04 17:57 Reiner Steib
@ 2005-08-04 18:44 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2005-08-04 18:44 UTC (permalink / raw)
> From: Reiner Steib <reinersteib+gmane@imap.cc>
> Date: Thu, 04 Aug 2005 19:57:43 +0200
>
> On GNU/Linux, Emacs autoloads window-12xx.
Yes, I know that. But this has nothing to do with the text in the
MS-DOS appendix of the manual: that text describes codepage.el which
is only used in the MS-DOS port. GNU/Linux uses code-pages.el, which
is a different (and slightly incompatible) implementation of the same
functionality.
> I.e. if Gnus displays an
> article with charset=window-12xx, all characters are displayed
> correctly. Sometimes people use charset=cp850 or need to edit files
> encoded in cpNNN. After `M-x codepages-setup RET NNN RET' the coding
> system is available. But etc/NEWS says "`codepage-setup' is now
> obsolete". What is the correct way to setup cpNNN?
See code-pages.el. I don't know the answer for that, perhaps the code
will tell you. IIRC, `codepage-setup' was declared obsolete because
the need to do something in order for a coding system to become
available was deemed a bad idea. But I don't remember the details,
nor what would be the Right Way. The birth of code-pages.el was
accompanied by heated discussions, so some issues were lost in the
dispute and never resolved.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: codepage-setup, autoload cpNNN
@ 2005-08-05 1:32 Kenichi Handa
0 siblings, 0 replies; 3+ messages in thread
From: Kenichi Handa @ 2005-08-05 1:32 UTC (permalink / raw)
Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> I.e. if Gnus displays an
>> article with charset=window-12xx, all characters are displayed
>> correctly. Sometimes people use charset=cp850 or need to edit files
>> encoded in cpNNN. After `M-x codepages-setup RET NNN RET' the coding
>> system is available. But etc/NEWS says "`codepage-setup' is now
>> obsolete". What is the correct way to setup cpNNN?
> See code-pages.el. I don't know the answer for that, perhaps the code
> will tell you. IIRC, `codepage-setup' was declared obsolete because
> the need to do something in order for a coding system to become
> available was deemed a bad idea. But I don't remember the details,
> nor what would be the Right Way. The birth of code-pages.el was
> accompanied by heated discussions, so some issues were lost in the
> dispute and never resolved.
Reiner, I thought that you added autoload cookies to all
coding systems in code-pages.el, but I've just found that
you actually added it only to iso-8859-* and windows-125*.
I think there's no problem in adding the cookie to all
coding systems defined in code-pages.el. So, I've just
commited such a change. Now there's no need to "setup
cpNNN" on GNU/Linux and Unix system. I've also changed the
relevant etc/NEWS entry to this:
*** Many new coding systems are available in the `code-pages' library.
These include complete versions of most of those in codepage.el, based
on Unicode mappings. `codepage-setup' is now obsolete and is used
only in the MS-DOS port of Emacs. All coding systems defined in
`code-pages' are auto-loaded.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-05 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 1:32 codepage-setup, autoload cpNNN Kenichi Handa
-- strict thread matches above, loose matches on Subject: below --
2005-08-04 17:57 Reiner Steib
2005-08-04 18:44 ` Eli Zaretskii
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).