/[emacs]/emacs/src/buffer.c
ViewVC logotype

Diff of /emacs/src/buffer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.414 by handa, Tue Feb 25 02:24:53 2003 UTC revision 1.415 by rms, Mon Mar 3 19:06:49 2003 UTC
# Line 150  Lisp_Object Vinhibit_read_only; Line 150  Lisp_Object Vinhibit_read_only;
150  /* List of functions to call that can query about killing a buffer.  /* List of functions to call that can query about killing a buffer.
151     If any of these functions returns nil, we don't kill it.  */     If any of these functions returns nil, we don't kill it.  */
152  Lisp_Object Vkill_buffer_query_functions;  Lisp_Object Vkill_buffer_query_functions;
153    Lisp_Object Qkill_buffer_query_functions;
154    
155  /* List of functions to call before changing an unmodified buffer.  */  /* List of functions to call before changing an unmodified buffer.  */
156  Lisp_Object Vfirst_change_hook;  Lisp_Object Vfirst_change_hook;
# Line 1304  with SIGHUP.  */) Line 1305  with SIGHUP.  */)
1305    {    {
1306      int count = SPECPDL_INDEX ();      int count = SPECPDL_INDEX ();
1307      Lisp_Object list;      Lisp_Object list;
1308        Lisp_Object arglist[1];
1309    
1310      record_unwind_protect (save_excursion_restore, save_excursion_save ());      record_unwind_protect (save_excursion_restore, save_excursion_save ());
1311      set_buffer_internal (b);      set_buffer_internal (b);
1312    
1313      /* First run the query functions; if any query is answered no,      /* First run the query functions; if any query is answered no,
1314         don't kill the buffer.  */         don't kill the buffer.  */
1315      for (list = Vkill_buffer_query_functions; CONSP (list); list = XCDR (list))      arglist[0] = Qkill_buffer_query_functions;
1316        {      if (NILP (Frun_hook_with_args_until_failure (1, arglist)))
1317          tem = call0 (XCAR (list));        return unbind_to (count, Qnil);
         if (NILP (tem))  
           return unbind_to (count, Qnil);  
       }  
1318    
1319      /* Then run the hooks.  */      /* Then run the hooks.  */
1320      Frun_hooks (1, &Qkill_buffer_hook);      Frun_hooks (1, &Qkill_buffer_hook);
# Line 5151  syms_of_buffer () Line 5150  syms_of_buffer ()
5150    staticpro (&Qafter_change_functions);    staticpro (&Qafter_change_functions);
5151    staticpro (&Qucs_set_table_for_input);    staticpro (&Qucs_set_table_for_input);
5152    
5153      Qkill_buffer_query_functions = intern ("kill-buffer-query-functions");
5154      staticpro (&Qkill_buffer_query_functions);
5155    
5156    Fput (Qprotected_field, Qerror_conditions,    Fput (Qprotected_field, Qerror_conditions,
5157          Fcons (Qprotected_field, Fcons (Qerror, Qnil)));          Fcons (Qprotected_field, Fcons (Qerror, Qnil)));
5158    Fput (Qprotected_field, Qerror_message,    Fput (Qprotected_field, Qerror_message,

Legend:
Removed from v.1.414  
changed lines
  Added in v.1.415

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26