aboutsummaryrefslogtreecommitdiffstats
path: root/src/dired.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dired.c')
-rw-r--r--src/dired.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/dired.c b/src/dired.c
index 0cdc062c699..f04ed255883 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -46,8 +46,6 @@ extern struct direct *readdir ();
46 46
47#endif 47#endif
48 48
49#undef NULL
50
51#include "lisp.h" 49#include "lisp.h"
52#include "buffer.h" 50#include "buffer.h"
53#include "commands.h" 51#include "commands.h"
@@ -81,7 +79,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\
81 int length; 79 int length;
82 Lisp_Object list, name; 80 Lisp_Object list, name;
83 81
84 if (!NULL (match)) 82 if (!NILP (match))
85 { 83 {
86 CHECK_STRING (match, 3); 84 CHECK_STRING (match, 3);
87 /* Compile it now so we don't get an error after opendir */ 85 /* Compile it now so we don't get an error after opendir */
@@ -110,10 +108,10 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\
110 len = NAMLEN (dp); 108 len = NAMLEN (dp);
111 if (dp->d_ino) 109 if (dp->d_ino)
112 { 110 {
113 if (NULL (match) 111 if (NILP (match)
114 || (0 <= re_search (&searchbuf, dp->d_name, len, 0, len, 0))) 112 || (0 <= re_search (&searchbuf, dp->d_name, len, 0, len, 0)))
115 { 113 {
116 if (!NULL (full)) 114 if (!NILP (full))
117 { 115 {
118 int index = XSTRING (dirname)->size; 116 int index = XSTRING (dirname)->size;
119 int total = len + index; 117 int total = len + index;
@@ -140,7 +138,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\
140 } 138 }
141 } 139 }
142 closedir (d); 140 closedir (d);
143 if (!NULL (nosort)) 141 if (!NILP (nosort))
144 return list; 142 return list;
145 return Fsort (Fnreverse (list), Qstring_lessp); 143 return Fsort (Fnreverse (list), Qstring_lessp);
146} 144}
@@ -233,7 +231,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
233 ** It would not actually be helpful to the user to ignore any possible 231 ** It would not actually be helpful to the user to ignore any possible
234 completions when making a list of them.** */ 232 completions when making a list of them.** */
235 233
236 for (passcount = !!all_flag; NULL (bestmatch) && passcount < 2; passcount++) 234 for (passcount = !!all_flag; NILP (bestmatch) && passcount < 2; passcount++)
237 { 235 {
238 if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data))) 236 if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data)))
239 report_file_error ("Opening directory", Fcons (dirname, Qnil)); 237 report_file_error ("Opening directory", Fcons (dirname, Qnil));
@@ -254,7 +252,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
254 252
255 len = NAMLEN (dp); 253 len = NAMLEN (dp);
256 254
257 if (!NULL (Vquit_flag) && NULL (Vinhibit_quit)) 255 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
258 goto quit; 256 goto quit;
259 if (!dp->d_ino 257 if (!dp->d_ino
260 || len < XSTRING (file)->size 258 || len < XSTRING (file)->size
@@ -297,7 +295,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
297 295
298 matchcount++; 296 matchcount++;
299 297
300 if (all_flag || NULL (bestmatch)) 298 if (all_flag || NILP (bestmatch))
301 { 299 {
302 /* This is a possible completion */ 300 /* This is a possible completion */
303 if (directoryp) 301 if (directoryp)
@@ -341,7 +339,7 @@ file_name_completion (file, dirname, all_flag, ver_flag)
341 339
342 unbind_to (count, Qnil); 340 unbind_to (count, Qnil);
343 341
344 if (all_flag || NULL (bestmatch)) 342 if (all_flag || NILP (bestmatch))
345 return bestmatch; 343 return bestmatch;
346 if (matchcount == 1 && bestmatchsize == XSTRING (file)->size) 344 if (matchcount == 1 && bestmatchsize == XSTRING (file)->size)
347 return Qt; 345 return Qt;