From: Lars Ingebrigtsen Date: Sat, 24 Jul 2021 15:28:10 +0000 (+0200) Subject: Tweak Fdirectory_append for efficiency X-Git-Tag: emacs-28.0.90~1718 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=28bf38743db6656715c5f3221d52467cbac4872f;p=emacs.git Tweak Fdirectory_append for efficiency * src/fileio.c (Fdirectory_append): Make slightly more efficient. --- 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),