summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-02-17 02:28:26 +0000
committerKarl Heuer <kwzh@gnu.org>1996-02-17 02:28:26 +0000
commit6cb52deffb02eb6501e9186d0802746fe3d6b965 (patch)
treee33dad3be2f6970f0f032084a00ff3a670439ee9 /src
parentf11c1c141cad3fa0a446573d0956b9891ee105c7 (diff)
downloademacs-6cb52deffb02eb6501e9186d0802746fe3d6b965.tar.gz
(Fopen_dribble_file): Close dribble file before
opening new file.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index af1fb97d1a3..209bf9dc7c9 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -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");