diff options
| author | Richard M. Stallman | 1994-04-27 08:35:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-27 08:35:48 +0000 |
| commit | bf162ea86c154fd2b8d7f8244f841ecfccd9e34f (patch) | |
| tree | 9edb11747e7de7ebd27609e359c38967729178c2 | |
| parent | d9209dee0ac6bcb6f78680ba1241617f05f0ce3c (diff) | |
| download | emacs-bf162ea86c154fd2b8d7f8244f841ecfccd9e34f.tar.gz emacs-bf162ea86c154fd2b8d7f8244f841ecfccd9e34f.zip | |
(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.
| -rw-r--r-- | src/fileio.c | 7 |
1 files 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.") | |||
| 2796 | Lisp_Object code; | 2796 | Lisp_Object code; |
| 2797 | code = Qnil; | 2797 | code = Qnil; |
| 2798 | GCPRO1 (filename); | 2798 | GCPRO1 (filename); |
| 2799 | code = call1 (Qfind_buffer_file_type, filename); | 2799 | current_buffer->buffer_file_type |
| 2800 | = call1 (Qfind_buffer_file_type, filename); | ||
| 2800 | UNGCPRO; | 2801 | UNGCPRO; |
| 2801 | if (XTYPE (code) == Lisp_Int) | 2802 | if (NILP (current_buffer->buffer_file_type)) |
| 2802 | XFASTINT (current_buffer->buffer_file_type) = XFASTINT (code); | ||
| 2803 | if (XFASTINT (current_buffer->buffer_file_type) == 0) | ||
| 2804 | { | 2803 | { |
| 2805 | int reduced_size | 2804 | int reduced_size |
| 2806 | = inserted - crlf_to_lf (inserted, &FETCH_CHAR (point - 1) + 1); | 2805 | = inserted - crlf_to_lf (inserted, &FETCH_CHAR (point - 1) + 1); |