emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add-hook


From: Richard Stallman
Subject: add-hook
Date: Sun, 09 Nov 2003 22:01:07 -0500

Today I took another look at the code in add-hook and this time I
could clearly see the problem that I originally fixed.  This code

    ;; Detect the case where make-local-variable was used on a hook
    ;; and do what we used to do.
    (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook)))
      (setq local t)))

claims to detect the case where the hook variable was made local in
the wrong way, but it doesn't really do that.  It will set `local' to
t in cases where the hook is not actually local.  In fact, in the
simplest case, where the hook variable has no local binding, and no
local hooks have ever been put on it, this code will still set `local'
to t.

That is very confusing, and contradicts what the comment says.
This needs to be cleaned up somehow.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]