(get_display_line): Don't abort if there's text
[bpt/emacs.git] / src / filelock.c
index 4c72525..bda8bed 100644 (file)
@@ -199,16 +199,19 @@ void
 lock_file (fn)
      register Lisp_Object fn;
 {
-  register Lisp_Object attack;
+  register Lisp_Object attack, orig_fn;
   register char *lfname;
 
+  orig_fn = fn;
+  fn = Fexpand_file_name (fn, Qnil);
+
   MAKE_LOCK_NAME (lfname, fn);
 
   /* See if this file is visited and has changed on disk since it was
      visited.  */
   {
     register Lisp_Object subject_buf;
-    subject_buf = Fget_file_buffer (fn);
+    subject_buf = get_truename_buffer (orig_fn);
     if (!NILP (subject_buf)
        && NILP (Fverify_visited_file_modtime (subject_buf))
        && !NILP (Ffile_exists_p (fn)))
@@ -329,6 +332,8 @@ unlock_file (fn)
 {
   register char *lfname;
 
+  fn = Fexpand_file_name (fn, Qnil);
+
   MAKE_LOCK_NAME (lfname, fn);
 
   lock_superlock (lfname);