comparison src/fns.c @ 11094:1a13a256f976

(concat): Treat integers as characters, not strings. This makes `concat' more like `insert'.
author Karl Heuer <kwzh@gnu.org>
date Wed, 22 Mar 1995 20:45:26 +0000
parents 2a8f29cd9e9f
children 052869c2f609
comparison
equal deleted inserted replaced
11093:278c796d9d7e 11094:1a13a256f976
220 } 220 }
221 221
222 DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0, 222 DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0,
223 "Concatenate all the arguments and make the result a string.\n\ 223 "Concatenate all the arguments and make the result a string.\n\
224 The result is a string whose elements are the elements of all the arguments.\n\ 224 The result is a string whose elements are the elements of all the arguments.\n\
225 Each argument may be a string, a list of characters (integers),\n\ 225 Each argument may be a string, a character (integer), or a list or vector\n\
226 or a vector of characters (integers).") 226 of characters (integers).")
227 (nargs, args) 227 (nargs, args)
228 int nargs; 228 int nargs;
229 Lisp_Object *args; 229 Lisp_Object *args;
230 { 230 {
231 return concat (nargs, args, Lisp_String, 0); 231 return concat (nargs, args, Lisp_String, 0);
286 this = args[argnum]; 286 this = args[argnum];
287 if (!(CONSP (this) || NILP (this) || VECTORP (this) || STRINGP (this) 287 if (!(CONSP (this) || NILP (this) || VECTORP (this) || STRINGP (this)
288 || COMPILEDP (this))) 288 || COMPILEDP (this)))
289 { 289 {
290 if (INTEGERP (this)) 290 if (INTEGERP (this))
291 args[argnum] = Fnumber_to_string (this); 291 args[argnum] = Fcons (this, Qnil);
292 else 292 else
293 args[argnum] = wrong_type_argument (Qsequencep, this); 293 args[argnum] = wrong_type_argument (Qsequencep, this);
294 } 294 }
295 } 295 }
296 296