aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
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 }