]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fopen_dribble_file): Close dribble file before
authorKarl Heuer <kwzh@gnu.org>
Sat, 17 Feb 1996 02:28:26 +0000 (02:28 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sat, 17 Feb 1996 02:28:26 +0000 (02:28 +0000)
opening new file.

src/keyboard.c

index af1fb97d1a3ee4624bafb23f54dd1734d981fa0d..209bf9dc7c978251e798de0a8b867224f1cb3828 100644 (file)
@@ -6881,15 +6881,12 @@ If FILE is nil, close any open dribble file.")
   (file)
      Lisp_Object file;
 {
-  if (NILP (file))
+  if (dribble)
     {
-      if (dribble)
-       {
-         fclose (dribble);
-         dribble = 0;
-       }
+      fclose (dribble);
+      dribble = 0;
     }
-  else
+  if (!NILP (file))
     {
       file = Fexpand_file_name (file, Qnil);
       dribble = fopen (XSTRING (file)->data, "w");