Subject: bug#21714: [PATCH] Add multiframe image support to NS port (bug#21714)

From: [email-masked]
Date: Sun, 13 Aug 2017 09:54:39 -0400

Alan Third <[email-masked]> writes:

> On Sun, Aug 13, 2017 at 09:21:44AM -0400, [email-masked] wrote:
>> Alan Third <[email-masked]> writes:
>>  
>> > +static Lisp_Object
>> > +image_spec_value (Lisp_Object spec, Lisp_Object key, bool *found)
>> > +{
>> > +  Lisp_Object tail;
>> > +
>> > +  eassert (valid_image_p (spec));
>> > +
>> > +  for (tail = XCDR (spec);
>> > +       CONSP (tail) && CONSP (XCDR (tail));
>> > +       tail = XCDR (XCDR (tail)))
>> > +    {
>> > +      if (EQ (XCAR (tail), key))
>> > +	{
>> > +	  if (found)
>> > +	    *found = 1;
>> > +	  return XCAR (XCDR (tail));
>> > +	}
>> > +    }
>> 
>> Wouldn't it be clearer to call Fplist_get here?

Actually we would need Fplist_member to set the 'found' parameter
correctly in case the value is Qnil.  Hmm, that one can signal an error,
so potentially it's not the right thing.

> Yes I think it would. I actually just copied the code from image.c, so
> would it maybe be worth tidying up that code too?

Oh, maybe we should make it non-static and call it rather than copying
then?