Subject: Re: bug#17125: Acknowledgement (24.4.50; daemon mode: closing X client frame exits entire emacs)

From: Dmitry Antipov <[email-masked]>
Date: Tue, 01 Apr 2014 20:27:44 +0400

On 04/01/2014 07:27 PM, Andreas Schwab wrote:

> This is not a useful comment.  Fvconcat(1,&obj) and vector1(obj) have
> quite different semantics.  The latter creates a one-element vector
> containing obj (same as Fvector(1,&obj)), whereas the former creates a
> vector from all elements in obj.

Argh, that was a horrible mistake. Thanks.

Peder, please try this instead.

Dmitry

=== modified file 'src/font.c'
--- src/font.c	2014-03-03 19:58:20 +0000
+++ src/font.c	2014-04-01 16:23:43 +0000
@@ -2756,10 +2756,7 @@
 	    Lisp_Object copy;
 
 	    val = driver_list->driver->list (f, scratch_font_spec);
-	    if (NILP (val))
-	      val = zero_vector;
-	    else
-	      val = Fvconcat (1, &val);
+	    val = NILP (val) ? zero_vector : Fvconcat (1, &val);
 	    copy = copy_font_spec (scratch_font_spec);
 	    ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type);
 	    XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache)));
@@ -2813,6 +2810,7 @@
 	else
 	  {
 	    entity = driver_list->driver->match (f, work);
+	    entity = NILP (entity) ? zero_vector : Fvconcat (1, &entity);
 	    copy = copy_font_spec (work);
 	    ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type);
 	    XSETCDR (cache, Fcons (Fcons (copy, entity), XCDR (cache)));