From 28bf38743db6656715c5f3221d52467cbac4872f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 24 Jul 2021 17:28:10 +0200 Subject: [PATCH] Tweak Fdirectory_append for efficiency * src/fileio.c (Fdirectory_append): Make slightly more efficient. --- src/fileio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index a4f08383776..ddce4723f42 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -795,7 +795,8 @@ usage: (record DIRECTORY &rest COMPONENTS) */) for (i = 0; i < nargs; i++) { Lisp_Object arg = args[i]; - if (STRING_MULTIBYTE (arg)) + /* Use multibyte or all-ASCII strings as is. */ + if (STRING_MULTIBYTE (arg) || SCHARS (arg) == SBYTES (arg)) elements[i] = arg; else elements[i] = make_multibyte_string (SSDATA (arg), SCHARS (arg), -- 2.39.2