aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index ab1ec670c87..bd7adb56da2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -183,6 +183,10 @@ int vms_stmlf_recfm;
183 expanding file names. This can be bound to / or \. */ 183 expanding file names. This can be bound to / or \. */
184Lisp_Object Vdirectory_sep_char; 184Lisp_Object Vdirectory_sep_char;
185 185
186extern Lisp_Object Vuser_login_name;
187
188extern int minibuf_level;
189
186/* These variables describe handlers that have "already" had a chance 190/* These variables describe handlers that have "already" had a chance
187 to handle the current operation. 191 to handle the current operation.
188 192
@@ -3515,7 +3519,14 @@ to the file, instead of any buffer contents, and END is ignored.")
3515 3519
3516#ifdef CLASH_DETECTION 3520#ifdef CLASH_DETECTION
3517 if (!auto_saving) 3521 if (!auto_saving)
3518 lock_file (lockname); 3522 {
3523 /* If we've locked this file for some other buffer,
3524 query before proceeding. */
3525 if (!visiting && EQ (Ffile_locked_p (lockname), Qt))
3526 call2 (intern ("ask-user-about-lock"), fn, Vuser_login_name);
3527
3528 lock_file (lockname);
3529 }
3519#endif /* CLASH_DETECTION */ 3530#endif /* CLASH_DETECTION */
3520 3531
3521 fn = XSTRING (filename)->data; 3532 fn = XSTRING (filename)->data;
@@ -4064,7 +4075,6 @@ A non-nil CURRENT-ONLY argument means save only current buffer.")
4064 int auto_saved = 0; 4075 int auto_saved = 0;
4065 char *omessage = echo_area_glyphs; 4076 char *omessage = echo_area_glyphs;
4066 int omessage_length = echo_area_glyphs_length; 4077 int omessage_length = echo_area_glyphs_length;
4067 extern int minibuf_level;
4068 int do_handled_files; 4078 int do_handled_files;
4069 Lisp_Object oquit; 4079 Lisp_Object oquit;
4070 int listdesc; 4080 int listdesc;