]> git.eshelyaron.com Git - emacs.git/commitdiff
(Finsert_file_contents): Fix accessing buffer_file_type
authorRichard M. Stallman <rms@gnu.org>
Wed, 27 Apr 1994 08:35:48 +0000 (08:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 27 Apr 1994 08:35:48 +0000 (08:35 +0000)
since it is t or nil.  Change to handle t or nil as value
of find-buffer-file-type.

src/fileio.c

index 6e2a095f16175101a9ca3eaa98ea48d1a74c29ad..262cd387b11c12e169196973e2f2e521bd6c9d17 100644 (file)
@@ -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);