diff options
| author | Kenichi Handa | 2003-10-07 01:29:12 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-10-07 01:29:12 +0000 |
| commit | a362520d437614d9c4937d6f89c0b0997f00cf90 (patch) | |
| tree | b363383652530fef73f2bcdf54f6790333065df1 /src/coding.c | |
| parent | a7803391c2504af0b5eba72fc5a492811b24ce78 (diff) | |
| download | emacs-a362520d437614d9c4937d6f89c0b0997f00cf90.tar.gz emacs-a362520d437614d9c4937d6f89c0b0997f00cf90.zip | |
(Qcoding_system_define_form): New variable.
(syms_of_coding): Intern and staticpro it.
(Fcheck_coding_system): Try to autoload the definition of
CODING-SYSTEM.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c index 6d36cc397c6..47bfbf5cacb 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -366,6 +366,10 @@ Lisp_Object Qcall_process, Qcall_process_region, Qprocess_argument; | |||
| 366 | Lisp_Object Qstart_process, Qopen_network_stream; | 366 | Lisp_Object Qstart_process, Qopen_network_stream; |
| 367 | Lisp_Object Qtarget_idx; | 367 | Lisp_Object Qtarget_idx; |
| 368 | 368 | ||
| 369 | /* If a symbol has this property, evaluate the value to define the | ||
| 370 | symbol as a coding system. */ | ||
| 371 | Lisp_Object Qcoding_system_define_form; | ||
| 372 | |||
| 369 | Lisp_Object Vselect_safe_coding_system_function; | 373 | Lisp_Object Vselect_safe_coding_system_function; |
| 370 | 374 | ||
| 371 | int coding_system_require_warning; | 375 | int coding_system_require_warning; |
| @@ -6375,7 +6379,14 @@ The value of property should be a vector of length 5. */) | |||
| 6375 | (coding_system) | 6379 | (coding_system) |
| 6376 | Lisp_Object coding_system; | 6380 | Lisp_Object coding_system; |
| 6377 | { | 6381 | { |
| 6378 | CHECK_SYMBOL (coding_system); | 6382 | Lisp_Object define_form; |
| 6383 | |||
| 6384 | define_form = Fget (coding_system, Qcoding_system_define_form); | ||
| 6385 | if (! NILP (define_form)) | ||
| 6386 | { | ||
| 6387 | Fput (coding_system, Qcoding_system_define_form, Qnil); | ||
| 6388 | safe_eval (define_form); | ||
| 6389 | } | ||
| 6379 | if (!NILP (Fcoding_system_p (coding_system))) | 6390 | if (!NILP (Fcoding_system_p (coding_system))) |
| 6380 | return coding_system; | 6391 | return coding_system; |
| 6381 | while (1) | 6392 | while (1) |
| @@ -7595,6 +7606,9 @@ syms_of_coding () | |||
| 7595 | Qutf_8 = intern ("utf-8"); | 7606 | Qutf_8 = intern ("utf-8"); |
| 7596 | staticpro (&Qutf_8); | 7607 | staticpro (&Qutf_8); |
| 7597 | 7608 | ||
| 7609 | Qcoding_system_define_form = intern ("coding-system-define-form"); | ||
| 7610 | staticpro (&Qcoding_system_define_form); | ||
| 7611 | |||
| 7598 | defsubr (&Scoding_system_p); | 7612 | defsubr (&Scoding_system_p); |
| 7599 | defsubr (&Sread_coding_system); | 7613 | defsubr (&Sread_coding_system); |
| 7600 | defsubr (&Sread_non_nil_coding_system); | 7614 | defsubr (&Sread_non_nil_coding_system); |