]> code.delx.au - gnu-emacs/blobdiff - src/dired.c
Rework C source files to avoid ^(
[gnu-emacs] / src / dired.c
index 89bd908c1e75497fd5bcf60af450c353e68d479d..e21b2273f7914cc8faeebfa3af5c4c25de449d50 100644 (file)
@@ -1,13 +1,13 @@
 /* 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
@@ -664,13 +664,15 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
          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;
        }
@@ -689,12 +691,11 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
       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)