comparison src/buffer.c @ 146:2af401a6ecca r20-2p1

Import from CVS: tag r20-2p1
author cvs
date Mon, 13 Aug 2007 09:34:46 +0200
parents 1856695b1fa9
children 0132846995bd
comparison
equal deleted inserted replaced
145:e13feca31ba6 146:2af401a6ecca
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 int Vdelete_auto_save_files; 169 int delete_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 (Vdelete_auto_save_files != 0) 1387 if (delete_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_BOOL ("delete-auto-save-files", &Vdelete_auto_save_files /* 2091 DEFVAR_BOOL ("delete-auto-save-files", &delete_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 = 1; 2094 delete_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