]> git.eshelyaron.com Git - emacs.git/commitdiff
(reset_buffer, init_buffer_once): Handle auto_save_file_format field.
authorLuc Teirlinck <teirllm@auburn.edu>
Wed, 8 Sep 2004 02:23:55 +0000 (02:23 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Wed, 8 Sep 2004 02:23:55 +0000 (02:23 +0000)
(syms_of_buffer): Add DEFVAR_PER_BUFFER for `buffer-auto-save-file-format'.

src/buffer.c

index bade501b1a75f81ea05b38aba53311fe5db31f86..c70831e155f602902aa88647fd76f2c4ad578fb1 100644 (file)
@@ -694,6 +694,7 @@ reset_buffer (b)
   b->mark_active = Qnil;
   b->point_before_scroll = Qnil;
   b->file_format = Qnil;
+  b->auto_save_file_format = Qt;
   b->last_selected_window = Qnil;
   XSETINT (b->display_count, 0);
   b->display_time = Qnil;
@@ -4962,6 +4963,7 @@ init_buffer_once ()
   buffer_defaults.undo_list = Qnil;
   buffer_defaults.mark_active = Qnil;
   buffer_defaults.file_format = Qnil;
+  buffer_defaults.auto_save_file_format = Qt;
   buffer_defaults.overlays_before = NULL;
   buffer_defaults.overlays_after = NULL;
   buffer_defaults.overlay_center = BEG;
@@ -5020,6 +5022,7 @@ init_buffer_once ()
   XSETINT (buffer_local_flags.file_truename, -1);
   XSETINT (buffer_local_flags.invisibility_spec, -1);
   XSETINT (buffer_local_flags.file_format, -1);
+  XSETINT (buffer_local_flags.auto_save_file_format, -1);
   XSETINT (buffer_local_flags.display_count, -1);
   XSETINT (buffer_local_flags.display_time, -1);
   XSETINT (buffer_local_flags.enable_multibyte_characters, -1);
@@ -5830,6 +5833,13 @@ functions; it should only affect their performance.  */);
 Formats are defined by `format-alist'.  This variable is
 set when a file is visited.  */);
 
+  DEFVAR_PER_BUFFER ("buffer-auto-save-file-format",
+                    &current_buffer->auto_save_file_format, Qnil,
+                    doc: /* *Format in which to write auto-save files.
+Should be a list of symbols naming formats that are defined in `format-alist'.
+If it is t, which is the default, auto-save files are written in the
+same format as a regular save would use.  */);
+
   DEFVAR_PER_BUFFER ("buffer-invisibility-spec",
                     &current_buffer->invisibility_spec, Qnil,
                     doc: /* Invisibility spec of this buffer.