From bf162ea86c154fd2b8d7f8244f841ecfccd9e34f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 27 Apr 1994 08:35:48 +0000 Subject: [PATCH] (Finsert_file_contents): Fix accessing buffer_file_type since it is t or nil. Change to handle t or nil as value of find-buffer-file-type. --- src/fileio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 6e2a095f161..262cd387b11 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2796,11 +2796,10 @@ and (2) it puts less data in the undo list.") Lisp_Object code; code = Qnil; GCPRO1 (filename); - code = call1 (Qfind_buffer_file_type, filename); + current_buffer->buffer_file_type + = call1 (Qfind_buffer_file_type, filename); UNGCPRO; - if (XTYPE (code) == Lisp_Int) - XFASTINT (current_buffer->buffer_file_type) = XFASTINT (code); - if (XFASTINT (current_buffer->buffer_file_type) == 0) + if (NILP (current_buffer->buffer_file_type)) { int reduced_size = inserted - crlf_to_lf (inserted, &FETCH_CHAR (point - 1) + 1); -- 2.39.5