aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa1997-09-05 08:07:44 +0000
committerKenichi Handa1997-09-05 08:07:44 +0000
commitb19fd4c592ecd226c003d695e55aeaa794806a62 (patch)
treea5c4cc1b1025f99a9ad32af7e0b6a47dcc033a1d /src/coding.c
parent05d70628060faba593e30f008de81327584b4717 (diff)
downloademacs-b19fd4c592ecd226c003d695e55aeaa794806a62.tar.gz
emacs-b19fd4c592ecd226c003d695e55aeaa794806a62.zip
(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.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c12
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.")
3788 || (INTEGERP (target) && EQ (target, XCONS (elt)->car)))) 3788 || (INTEGERP (target) && EQ (target, XCONS (elt)->car))))
3789 { 3789 {
3790 val = XCONS (elt)->cdr; 3790 val = XCONS (elt)->cdr;
3791 /* Here, if VAL is both a valid coding system and a valid
3792 function symbol, we return VAL as a coding system. */
3791 if (CONSP (val)) 3793 if (CONSP (val))
3792 return val; 3794 return val;
3793 if (! SYMBOLP (val)) 3795 if (! SYMBOLP (val))
3794 return Qnil; 3796 return Qnil;
3795 if (! NILP (Fcoding_system_p (val))) 3797 if (! NILP (Fcoding_system_p (val)))
3796 return Fcons (val, val); 3798 return Fcons (val, val);
3797 if (!NILP (Ffboundp (val))) 3799 if (! NILP (Ffboundp (val)))
3798 return call1 (val, Flist (nargs, args)); 3800 {
3801 val = call1 (val, Flist (nargs, args));
3802 if (CONSP (val))
3803 return val;
3804 if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val)))
3805 return Fcons (val, val);
3806 }
3799 return Qnil; 3807 return Qnil;
3800 } 3808 }
3801 } 3809 }