aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-12-31 18:16:16 +0000
committerRichard M. Stallman1993-12-31 18:16:16 +0000
commita7e8247287d006c4425737f219f15276a6a2cd17 (patch)
tree57a55f15c5d9afb104230e0e54fcc2554c5734e4 /src
parent79a7046ca7c50f4abd934a651e23351f2a4a1fa4 (diff)
downloademacs-a7e8247287d006c4425737f219f15276a6a2cd17.tar.gz
emacs-a7e8247287d006c4425737f219f15276a6a2cd17.zip
(Finsert_file_contents): Avoid setting buffer-file-name field if ran a handler.
Get rid of local var `handled'.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c
index a71d4a17d03..9b196c2a87a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2394,7 +2394,6 @@ If VISIT is non-nil, BEG and END must be nil.")
2394 Lisp_Object handler, val, insval; 2394 Lisp_Object handler, val, insval;
2395 Lisp_Object p; 2395 Lisp_Object p;
2396 int total; 2396 int total;
2397 int handled = 0;
2398 2397
2399 val = Qnil; 2398 val = Qnil;
2400 p = Qnil; 2399 p = Qnil;
@@ -2412,7 +2411,6 @@ If VISIT is non-nil, BEG and END must be nil.")
2412 if (!NILP (handler)) 2411 if (!NILP (handler))
2413 { 2412 {
2414 val = call5 (handler, Qinsert_file_contents, filename, visit, beg, end); 2413 val = call5 (handler, Qinsert_file_contents, filename, visit, beg, end);
2415 handled = 1;
2416 goto handled; 2414 goto handled;
2417 } 2415 }
2418 2416
@@ -2544,8 +2542,11 @@ If VISIT is non-nil, BEG and END must be nil.")
2544 stat (XSTRING (filename)->data, &st); 2542 stat (XSTRING (filename)->data, &st);
2545#endif 2543#endif
2546 2544
2547 if (! handled) 2545 if (NILP (handler))
2548 current_buffer->modtime = st.st_mtime; 2546 {
2547 current_buffer->modtime = st.st_mtime;
2548 current_buffer->filename = filename;
2549 }
2549 2550
2550 current_buffer->save_modified = MODIFF; 2551 current_buffer->save_modified = MODIFF;
2551 current_buffer->auto_save_modified = MODIFF; 2552 current_buffer->auto_save_modified = MODIFF;
@@ -2558,7 +2559,6 @@ If VISIT is non-nil, BEG and END must be nil.")
2558 unlock_file (filename); 2559 unlock_file (filename);
2559 } 2560 }
2560#endif /* CLASH_DETECTION */ 2561#endif /* CLASH_DETECTION */
2561 current_buffer->filename = filename;
2562 /* If visiting nonexistent file, return nil. */ 2562 /* If visiting nonexistent file, return nil. */
2563 if (current_buffer->modtime == -1) 2563 if (current_buffer->modtime == -1)
2564 report_file_error ("Opening input file", Fcons (filename, Qnil)); 2564 report_file_error ("Opening input file", Fcons (filename, Qnil));