comparison src/buffer.h @ 107845:688679bd79f5

Try to detect file modification within the same second. * buffer.h (struct buffer): New field modtime_size. * buffer.c (reset_buffer): Initialize it. * fileio.c (Finsert_file_contents, Fwrite_region): Set it. (Fverify_visited_file_modtime): Check it. (Fclear_visited_file_modtime, Fset_visited_file_modtime): Clear it. (Fset_visited_file_modtime): Set (or clear) it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 12 Apr 2010 21:47:40 -0400
parents c5f9e4613394
children bef5d1738c0b
comparison
equal deleted inserted replaced
107844:17333bba44b4 107845:688679bd79f5
511 /* Set to the modtime of the visited file when read or written. 511 /* Set to the modtime of the visited file when read or written.
512 -1 means visited file was nonexistent. 512 -1 means visited file was nonexistent.
513 0 means visited file modtime unknown; in no case complain 513 0 means visited file modtime unknown; in no case complain
514 about any mismatch on next save attempt. */ 514 about any mismatch on next save attempt. */
515 int modtime; 515 int modtime;
516 /* Size of the file when modtime was set. This is used to detect the
517 case where the file grew while we were reading it, so the modtime
518 is still the same (since it's rounded up to seconds) but we're actually
519 not up-to-date. -1 means the size is unknown. Only meaningful if
520 modtime is actually set. */
521 EMACS_INT modtime_size;
516 /* The value of text->modiff at the last auto-save. */ 522 /* The value of text->modiff at the last auto-save. */
517 int auto_save_modified; 523 int auto_save_modified;
518 /* The value of text->modiff at the last display error. 524 /* The value of text->modiff at the last display error.
519 Redisplay of this buffer is inhibited until it changes again. */ 525 Redisplay of this buffer is inhibited until it changes again. */
520 int display_error_modiff; 526 int display_error_modiff;