Mercurial > emacs
comparison src/filelock.c @ 21818:af741167f81e
(lock_file): gcpro `fn'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 29 Apr 1998 00:28:28 +0000 |
parents | 36667ebd744e |
children | 75f04f235df1 |
comparison
equal
deleted
inserted
replaced
21817:4dbf2af94988 | 21818:af741167f81e |
---|---|
382 | 382 |
383 /* See if this file is visited and has changed on disk since it was | 383 /* See if this file is visited and has changed on disk since it was |
384 visited. */ | 384 visited. */ |
385 { | 385 { |
386 register Lisp_Object subject_buf; | 386 register Lisp_Object subject_buf; |
387 struct gcpro1; | |
388 | |
387 subject_buf = get_truename_buffer (orig_fn); | 389 subject_buf = get_truename_buffer (orig_fn); |
390 GCPRO1 (fn); | |
391 | |
388 if (!NILP (subject_buf) | 392 if (!NILP (subject_buf) |
389 && NILP (Fverify_visited_file_modtime (subject_buf)) | 393 && NILP (Fverify_visited_file_modtime (subject_buf)) |
390 && !NILP (Ffile_exists_p (fn))) | 394 && !NILP (Ffile_exists_p (fn))) |
391 call1 (intern ("ask-user-about-supersession-threat"), fn); | 395 call1 (intern ("ask-user-about-supersession-threat"), fn); |
396 | |
397 UNGCPRO; | |
392 } | 398 } |
393 | 399 |
394 /* Try to lock the lock. */ | 400 /* Try to lock the lock. */ |
395 if (lock_if_free (&lock_info, lfname) <= 0) | 401 if (lock_if_free (&lock_info, lfname) <= 0) |
396 /* Return now if we have locked it, or if lock creation failed */ | 402 /* Return now if we have locked it, or if lock creation failed */ |