Mercurial > hg > xemacs-beta
comparison src/eval.c @ 353:3b3709405255 r21-1-6
Import from CVS: tag r21-1-6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:55:33 +0200 |
parents | 851ff35f137f |
children | 8e84bee8ddd0 |
comparison
equal
deleted
inserted
replaced
352:e7288c5461ae | 353:3b3709405255 |
---|---|
3689 Lisp_Object | 3689 Lisp_Object |
3690 run_hook_with_args_in_buffer (struct buffer *buf, int nargs, Lisp_Object *args, | 3690 run_hook_with_args_in_buffer (struct buffer *buf, int nargs, Lisp_Object *args, |
3691 enum run_hooks_condition cond) | 3691 enum run_hooks_condition cond) |
3692 { | 3692 { |
3693 Lisp_Object sym, val, ret; | 3693 Lisp_Object sym, val, ret; |
3694 struct gcpro gcpro1, gcpro2; | |
3695 | 3694 |
3696 if (!initialized || preparing_for_armageddon) | 3695 if (!initialized || preparing_for_armageddon) |
3697 /* We need to bail out of here pronto. */ | 3696 /* We need to bail out of here pronto. */ |
3698 return Qnil; | 3697 return Qnil; |
3699 | 3698 |
3712 args[0] = val; | 3711 args[0] = val; |
3713 return Ffuncall (nargs, args); | 3712 return Ffuncall (nargs, args); |
3714 } | 3713 } |
3715 else | 3714 else |
3716 { | 3715 { |
3717 GCPRO2 (sym, val); | 3716 struct gcpro gcpro1, gcpro2, gcpro3; |
3717 Lisp_Object globals = Qnil; | |
3718 GCPRO3 (sym, val, globals); | |
3718 | 3719 |
3719 for (; | 3720 for (; |
3720 CONSP (val) && ((cond == RUN_HOOKS_TO_COMPLETION) | 3721 CONSP (val) && ((cond == RUN_HOOKS_TO_COMPLETION) |
3721 || (cond == RUN_HOOKS_UNTIL_SUCCESS ? NILP (ret) | 3722 || (cond == RUN_HOOKS_UNTIL_SUCCESS ? NILP (ret) |
3722 : !NILP (ret))); | 3723 : !NILP (ret))); |
3724 { | 3725 { |
3725 if (EQ (XCAR (val), Qt)) | 3726 if (EQ (XCAR (val), Qt)) |
3726 { | 3727 { |
3727 /* t indicates this hook has a local binding; | 3728 /* t indicates this hook has a local binding; |
3728 it means to run the global binding too. */ | 3729 it means to run the global binding too. */ |
3729 Lisp_Object globals = Fdefault_value (sym); | 3730 globals = Fdefault_value (sym); |
3730 | 3731 |
3731 if ((! CONSP (globals) || EQ (XCAR (globals), Qlambda)) && | 3732 if ((! CONSP (globals) || EQ (XCAR (globals), Qlambda)) && |
3732 ! NILP (globals)) | 3733 ! NILP (globals)) |
3733 { | 3734 { |
3734 args[0] = globals; | 3735 args[0] = globals; |