emacs-devel
[Top][All Lists]
Advanced

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

Re: autoload for define-ccl-program


From: Dave Love
Subject: Re: autoload for define-ccl-program
Date: 25 Nov 2001 18:29:26 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.30

>>>>> "WL" == Werner LEMBERG <address@hidden> writes:

 WL> Maybe I'm on the wrong track, so I will describe how to use it.

I think so.  Isn't autoloading coding systems what you really want?

 WL> As you can see, the two ccl functions should be automatically
 WL> loaded if euc-tw is accessed.

If you have coding system autoloads and put the CCL in a file with the
coding system definition, you'll get that.  (I guess the real issue is
large tables being used, rather than the CCL itself, is it?)

 WL> While `set-language-info-alist' offers a
 WL> `features' key which loads a file with auxiliary routines,
 WL> `make-coding-system' lacks this possibility.  Maybe it is better to
 WL> have this `features' key for `make-coding-system' also?

I don't think it could work the same.  However, you can kludge a hook
on first use of a coding system for encoding or decoding with
pre-write and post-read functions. e.g.:

(defun utf-8-pre-write-conversion (beg end)
  "Semi-dummy pre-write function effectively to autoload ucs-tables."
  ;; Ensure translation table is loaded.
  (require 'ucs-tables)
  ;; Don't do this again.
  (coding-system-put 'mule-utf-8 'pre-write-conversion nil)
  nil)



reply via email to

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