aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 45a04caebfd..aced59e1b8e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1250,26 +1250,18 @@ default_line_pixel_height (struct window *w)
1250static Lisp_Object 1250static Lisp_Object
1251string_from_display_spec (Lisp_Object spec) 1251string_from_display_spec (Lisp_Object spec)
1252{ 1252{
1253 if (CONSP (spec)) 1253 if (VECTORP (spec))
1254 { 1254 {
1255 do { 1255 for (ptrdiff_t i = 0; i < ASIZE (spec); i++)
1256 if (STRINGP (XCAR (spec))) 1256 if (STRINGP (AREF (spec, i)))
1257 return XCAR (spec); 1257 return AREF (spec, i);
1258 spec = XCDR (spec);
1259 } while (CONSP (spec));
1260 } 1258 }
1261 else if (VECTORP (spec)) 1259 else
1262 { 1260 {
1263 ptrdiff_t i; 1261 for (; CONSP (spec); spec = XCDR (spec))
1264 1262 if (STRINGP (XCAR (spec)))
1265 for (i = 0; i < ASIZE (spec); i++) 1263 return XCAR (spec);
1266 {
1267 if (STRINGP (AREF (spec, i)))
1268 return AREF (spec, i);
1269 }
1270 return Qnil;
1271 } 1264 }
1272
1273 return spec; 1265 return spec;
1274} 1266}
1275 1267