unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* add-hook
@ 2003-11-10  3:01 Richard Stallman
  2003-11-10  5:07 ` add-hook Miles Bader
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2003-11-10  3:01 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-11-12 20:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-10  3:01 add-hook Richard Stallman
2003-11-10  5:07 ` add-hook Miles Bader
2003-11-10 15:41   ` add-hook Stefan Monnier
2003-11-11  2:26     ` add-hook Miles Bader
2003-11-12 20:02       ` add-hook Richard Stallman
2003-11-11 18:22   ` add-hook Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).