comparison src/buffer.c @ 142:1856695b1fa9 r20-2b5

Import from CVS: tag r20-2b5
author cvs
date Mon, 13 Aug 2007 09:33:18 +0200
parents 585fb297b004
children 2af401a6ecca
comparison
equal deleted inserted replaced
141:ea67ad3963dc 142:1856695b1fa9
164 /* List of functions to call that can query about killing a buffer. 164 /* List of functions to call that can query about killing a buffer.
165 If any of these functions returns nil, we don't kill it. */ 165 If any of these functions returns nil, we don't kill it. */
166 Lisp_Object Vkill_buffer_query_functions; 166 Lisp_Object Vkill_buffer_query_functions;
167 167
168 /* Non-nil means delete a buffer's auto-save file when the buffer is saved. */ 168 /* Non-nil means delete a buffer's auto-save file when the buffer is saved. */
169 Lisp_Object Vdelete_auto_save_files; 169 int Vdelete_auto_save_files;
170 170
171 Lisp_Object Qbuffer_live_p; 171 Lisp_Object Qbuffer_live_p;
172 Lisp_Object Qbuffer_or_string_p; 172 Lisp_Object Qbuffer_or_string_p;
173 173
174 /* List of functions to call before changing an unmodified buffer. */ 174 /* List of functions to call before changing an unmodified buffer. */
1382 /* Delete any auto-save file, if we saved it in this session. */ 1382 /* Delete any auto-save file, if we saved it in this session. */
1383 if (STRINGP (b->auto_save_file_name) 1383 if (STRINGP (b->auto_save_file_name)
1384 && b->auto_save_modified != 0 1384 && b->auto_save_modified != 0
1385 && BUF_SAVE_MODIFF (b) < b->auto_save_modified) 1385 && BUF_SAVE_MODIFF (b) < b->auto_save_modified)
1386 { 1386 {
1387 if (!NILP (Vdelete_auto_save_files)) 1387 if (Vdelete_auto_save_files != 0)
1388 { 1388 {
1389 /* deleting the auto save file might kill b! */ 1389 /* deleting the auto save file might kill b! */
1390 /* #### dmoore - fix this crap, we do this same gcpro and 1390 /* #### dmoore - fix this crap, we do this same gcpro and
1391 buffer liveness check multiple times. Let's get a 1391 buffer liveness check multiple times. Let's get a
1392 macro or something for it. */ 1392 macro or something for it. */
2086 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions /* 2086 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions /*
2087 List of functions called with no args to query before killing a buffer. 2087 List of functions called with no args to query before killing a buffer.
2088 */ ); 2088 */ );
2089 Vkill_buffer_query_functions = Qnil; 2089 Vkill_buffer_query_functions = Qnil;
2090 2090
2091 DEFVAR_LISP ("delete-auto-save-files", &Vdelete_auto_save_files /* 2091 DEFVAR_BOOL ("delete-auto-save-files", &Vdelete_auto_save_files /*
2092 *Non-nil means delete auto-save file when a buffer is saved or killed. 2092 *Non-nil means delete auto-save file when a buffer is saved or killed.
2093 */ ); 2093 */ );
2094 Vdelete_auto_save_files = Qt; 2094 Vdelete_auto_save_files = 1;
2095 } 2095 }
2096 2096
2097 /* DOC is ignored because it is snagged and recorded externally 2097 /* DOC is ignored because it is snagged and recorded externally
2098 * by make-docfile */ 2098 * by make-docfile */
2099 /* Renamed from DEFVAR_PER_BUFFER because FSFmacs D_P_B takes 2099 /* Renamed from DEFVAR_PER_BUFFER because FSFmacs D_P_B takes