Subject: Re: bug#23933: 25.1.50; Run a buffer-local hook with mapc

From: Eli Zaretskii <[email-masked]>
Date: Sun, 10 Jul 2016 18:55:21 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Tino Calancha <[email-masked]>,  [email-masked],  [email-masked]
> Date: Sun, 10 Jul 2016 11:18:56 -0400
> 
> >> -  (mapc #'funcall after-quit-hook-internal)
> >> +  ;; after-quit-hook-internal is buffer-local; see `ediff-filegroup-action'.
> >> +  (mapc (lambda (f) (or (eq f t) (funcall f))) after-quit-hook-internal)
> >> ))
> > Thanks, but why do we use mapc to run hooks?  We used to have
> > run-hooks there.
> 
> after-quit-hook-internal is a variable, not a hook.

Then how come it includes t in its value?

> A hook is a symbol whose symbol-value slot holds a list of functions;
> this happens to match a dynamically-bound variable, but not
> a lexically-bound variable.

So you are saying we should convert that variable to a hook?