From: Richard M. Stallman Date: Wed, 27 Apr 1994 08:35:48 +0000 (+0000) Subject: (Finsert_file_contents): Fix accessing buffer_file_type X-Git-Tag: emacs-19.34~8723 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf162ea86c154fd2b8d7f8244f841ecfccd9e34f;p=emacs.git (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. --- 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);