diff options
| author | Kenichi Handa <handa@m17n.org> | 1997-09-05 08:07:44 +0000 |
|---|---|---|
| committer | Kenichi Handa <handa@m17n.org> | 1997-09-05 08:07:44 +0000 |
| commit | b19fd4c592ecd226c003d695e55aeaa794806a62 (patch) | |
| tree | a5c4cc1b1025f99a9ad32af7e0b6a47dcc033a1d | |
| parent | 05d70628060faba593e30f008de81327584b4717 (diff) | |
| download | emacs-b19fd4c592ecd226c003d695e55aeaa794806a62.tar.gz | |
(Ffind_operation_coding_system): If a function in
XXX-coding-system-alist returns a coding system (instead of cons
of coding systems), return cons of it.
| -rw-r--r-- | src/coding.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c index 2b46877055d..9487261b78d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3788,14 +3788,22 @@ which is a list of all the arguments given to this function.") || (INTEGERP (target) && EQ (target, XCONS (elt)->car)))) { val = XCONS (elt)->cdr; + /* Here, if VAL is both a valid coding system and a valid + function symbol, we return VAL as a coding system. */ if (CONSP (val)) return val; if (! SYMBOLP (val)) return Qnil; if (! NILP (Fcoding_system_p (val))) return Fcons (val, val); - if (!NILP (Ffboundp (val))) - return call1 (val, Flist (nargs, args)); + if (! NILP (Ffboundp (val))) + { + val = call1 (val, Flist (nargs, args)); + if (CONSP (val)) + return val; + if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val))) + return Fcons (val, val); + } return Qnil; } } |
