Re: Modifying a hook while it's being executed

2005-08-08 Thread David Kastrup
Henrik Enberg <[EMAIL PROTECTED]> writes: >> From: David Kastrup <[EMAIL PROTECTED]> >> Date: Mon, 08 Aug 2005 22:55:17 +0200 >> >> Henrik Enberg <[EMAIL PROTECTED]> writes: >> >> > `remove' is part of the cl library which isn't supposed to be used in >> > core Emacs. >> >> remove is a compiled

Re: Modifying a hook while it's being executed

2005-08-08 Thread Henrik Enberg
> From: David Kastrup <[EMAIL PROTECTED]> > Date: Mon, 08 Aug 2005 22:55:17 +0200 > > Henrik Enberg <[EMAIL PROTECTED]> writes: > > > `remove' is part of the cl library which isn't supposed to be used in > > core Emacs. > > remove is a compiled Lisp function in `subr'. > (remove ELT SEQ) > > Re

Re: Modifying a hook while it's being executed

2005-08-08 Thread David Kastrup
Henrik Enberg <[EMAIL PROTECTED]> writes: >> From: [EMAIL PROTECTED] >> Date: 8 Aug 2005 13:21:13 -0700 >> >> rgb wrote: >> > >> > This line appears in remove-hook. >> > >> > (setq hook-value (delete function (copy-sequence hook-value))) >> > >> > It makes me think that a change to the hook's val

Re: Modifying a hook while it's being executed

2005-08-08 Thread Henrik Enberg
> From: [EMAIL PROTECTED] > Date: 8 Aug 2005 13:21:13 -0700 > > rgb wrote: > > > > This line appears in remove-hook. > > > > (setq hook-value (delete function (copy-sequence hook-value))) > > > > It makes me think that a change to the hook's value will not > > be visible to the present execution o

Re: Modifying a hook while it's being executed

2005-08-08 Thread kcin
rgb wrote: > > This line appears in remove-hook. > > (setq hook-value (delete function (copy-sequence hook-value))) > > It makes me think that a change to the hook's value will not > be visible to the present execution of the run-hooks command. > So I'd say it appears to be perfectly safe. Yes, it

Re: Modifying a hook while it's being executed

2005-08-08 Thread rgb
J. David Boyd wrote: > PT <[EMAIL PROTECTED]> writes: > > > Is it safe? I haven't seen it anywhere stated explicitly. > > > > For example, I add a hook function to pre-command-hook or > > post-command-hook which removes itself from the hook when invoked. > > > > Does it blow up emacs? If not, the

Re: Modifying a hook while it's being executed

2005-08-08 Thread J. David Boyd
PT <[EMAIL PROTECTED]> writes: > Is it safe? I haven't seen it anywhere stated explicitly. > > For example, I add a hook function to pre-command-hook or > post-command-hook which removes itself from the hook when invoked. > Does it blow up emacs? If not, then it is probably safe! Dave __