comparison src/editfns.c @ 6206:67c608b0e2f7

(save_excursion_restore): Don't call Vrun_hooks if nil.
author Richard M. Stallman <rms@gnu.org>
date Sat, 05 Mar 1994 20:32:35 +0000
parents 11c1e1696fe3
children d0f6a386b7cb
comparison
equal deleted inserted replaced
6205:88e41d7d1e27 6206:67c608b0e2f7
322 Fswitch_to_buffer (Fcurrent_buffer (), Qnil); 322 Fswitch_to_buffer (Fcurrent_buffer (), Qnil);
323 #endif /* 0 */ 323 #endif /* 0 */
324 324
325 tem1 = current_buffer->mark_active; 325 tem1 = current_buffer->mark_active;
326 current_buffer->mark_active = Fcdr (tem); 326 current_buffer->mark_active = Fcdr (tem);
327 if (! NILP (current_buffer->mark_active)) 327 if (!NILP (Vrun_hooks))
328 call1 (Vrun_hooks, intern ("activate-mark-hook")); 328 {
329 else if (! NILP (tem1)) 329 if (! NILP (current_buffer->mark_active))
330 call1 (Vrun_hooks, intern ("deactivate-mark-hook")); 330 call1 (Vrun_hooks, intern ("activate-mark-hook"));
331 else if (! NILP (tem1))
332 call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
333 }
331 return Qnil; 334 return Qnil;
332 } 335 }
333 336
334 DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0, 337 DEFUN ("save-excursion", Fsave_excursion, Ssave_excursion, 0, UNEVALLED, 0,
335 "Save point, mark, and current buffer; execute BODY; restore those things.\n\ 338 "Save point, mark, and current buffer; execute BODY; restore those things.\n\