/* Lisp functions for making directory listings.
- Copyright (C) 1985-1986, 1993-1994, 1999-2015 Free Software
+ Copyright (C) 1985-1986, 1993-1994, 1999-2016 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
decoded don't. For example, "a" should not match "a-ring" on
file systems that store decomposed characters. */
Lisp_Object zero = make_number (0);
- Lisp_Object compare;
- Lisp_Object cmp;
+
if (check_decoded && SCHARS (file) <= SCHARS (name))
{
- compare = make_number (SCHARS (file));
- cmp = Fcompare_strings (name, zero, compare, file, zero, compare,
- completion_ignore_case ? Qt : Qnil);
+ /* FIXME: This is a copy of the code below. */
+ ptrdiff_t compare = SCHARS (file);
+ Lisp_Object cmp
+ = Fcompare_strings (name, zero, make_number (compare),
+ file, zero, make_number (compare),
+ completion_ignore_case ? Qt : Qnil);
if (!EQ (cmp, Qt))
continue;
}
else
{
/* FIXME: This is a copy of the code in Ftry_completion. */
- compare = min (bestmatchsize, SCHARS (name));
- cmp = Fcompare_strings (bestmatch, zero,
- make_number (compare),
- name, zero,
- make_number (compare),
- completion_ignore_case ? Qt : Qnil);
+ ptrdiff_t compare = min (bestmatchsize, SCHARS (name));
+ Lisp_Object cmp
+ = Fcompare_strings (bestmatch, zero, make_number (compare),
+ name, zero, make_number (compare),
+ completion_ignore_case ? Qt : Qnil);
ptrdiff_t matchsize = EQ (cmp, Qt) ? compare : eabs (XINT (cmp)) - 1;
if (completion_ignore_case)