emacs-devel
[Top][All Lists]
Advanced

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

Q: something like autoload for coding-systems?


From: Pavel Janík
Subject: Q: something like autoload for coding-systems?
Date: Sun, 04 Nov 2001 10:59:06 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i386-suse-linux-gnu)

Hi,

I'm the maintainer for a small package emacs-cs-utils which helps users
from Czech and Slovak Republic to make better use of Emacs. It is now
mainly documentation of various helpful Emacs' features and small code
snippets. This package is getting smaller as features from it are going to
be standard parts of Emacs (e.g. I have removed french-filling from it
today, because Stefan integrated it into Emacs).

Users here in CZ and SK need to use CP1250 and CP852 very often :-( In my
package they can just click in menu and coding-system cp1250 is defined,
because it does

(codepage-setup '1250)

I got an idea how to remove that need completely: to invent something like
autoload for coding systems. In my dream, it will work as follows:

Gnus-user has just received an e-mail from win-user. It tells to Gnus, it
is in windows-1250. Gnus knows that windows-1250 is in fact cp1250:

    ;; Windows-1250 is a variant of Latin-2 heavily used by Microsoft
    ;; Outlook users in Czech republic. Use this to allow reading of their
    ;; e-mails. cp1250 should be defined by M-x codepage-setup.  
    ,@(if (and (not (mm-coding-system-p 'windows-1250))
               (mm-coding-system-p 'cp1250))   
          '((windows-1250 . cp1250)))

mm-coding-system-p (or something else, I do not know internals well to
propose correct place) will see 'cp1250 for the first time and
auto-magically will do codepage-setup for it.

But it is not about Gnus only. When user sees a file which he knows is in
CP1250, he will simply do C-x RET C cp1250 RET C-x C-f file RET and the
coding-system will be again auto-magically defined. Now he must do M-x
codepage-setup RET 1250 RET and then the same as before. We know the list
of supported codepages (see cp-supported-codepages) so this could be done
easily, I think.

Users could then remove such silly codes from they ~/.emacs files
etc. However, this is only proposal. I did not thought about it deeper,
because I do not have enough know-how to do it now.

But I'd like to know opinions and maybe someone who will help me to
implement this :-)
-- 
Pavel Janík

Do you get smacked with a rolled-up newspaper too?
                  -- Jeremy Allison to Andrew Tridgell



reply via email to

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