aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Gregory2016-12-31 13:18:57 +0200
committerEli Zaretskii2016-12-31 13:18:57 +0200
commit1da34d6a9dbe35fd83906a16a7f730298c3f8ab3 (patch)
treece96bd396268926d6c0ef484bbf286a592f294b3 /src
parenta78a167a4f74759fd291802b95193a0f39a4cb59 (diff)
downloademacs-1da34d6a9dbe35fd83906a16a7f730298c3f8ab3.tar.gz
emacs-1da34d6a9dbe35fd83906a16a7f730298c3f8ab3.zip
Simplify code in 'string_from_display_spec'
* src/xdisp.c (string_from_display_spec): Eliminate a redundant test before the loop. Copyright-paperwork-exempt: yes
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 5de5ecaef0d..45a04caebfd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1252,12 +1252,11 @@ string_from_display_spec (Lisp_Object spec)
1252{ 1252{
1253 if (CONSP (spec)) 1253 if (CONSP (spec))
1254 { 1254 {
1255 while (CONSP (spec)) 1255 do {
1256 { 1256 if (STRINGP (XCAR (spec)))
1257 if (STRINGP (XCAR (spec))) 1257 return XCAR (spec);
1258 return XCAR (spec); 1258 spec = XCDR (spec);
1259 spec = XCDR (spec); 1259 } while (CONSP (spec));
1260 }
1261 } 1260 }
1262 else if (VECTORP (spec)) 1261 else if (VECTORP (spec))
1263 { 1262 {