[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add-hook sets hook globally if buffer-local hook is nil
From: |
Alan Shutko |
Subject: |
Re: add-hook sets hook globally if buffer-local hook is nil |
Date: |
Wed, 22 Oct 2003 08:16:52 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Lute Kamstra <address@hidden> writes:
> This new behavior is intended; it is documented in the docstring of
> add-hook and in the section on hooks in the Lisp Reference manual.
Gack, that's even worse.
This causes serious breakage, because software puts stuff on
local-write-file-hooks expecting it to be _local_, as promised by
_its_ docstring.
For instance, bbdb puts a function on there to add a coding system
cookie to the bbdb file. With this change, the
"local-write-file-hooks" puts the coding system cookie to all files.
> The change is mentioned in the NEWS file. Note furthermore that
> local-write-file-hooks is obsolete.
It may be obsolete, but it's not gone. We have to work with existing
programs. I don't think reversing the meaning of default add-hook
behavior is the way to do that.
Furthermore, the NEWS entry is incorrect:
** A non-nil value for the LOCAL arg of add-hook makes the hook
buffer-local even if `make-local-hook' hasn't been called, which might
make a difference to some code.
That makes sense. It doesn't say anything about "If you don't set
the optional local parameter, we will _ignore_ the buffer local state
of the variable."
--
Alan Shutko <address@hidden> - I am the rocks.
5 days, 2 hours, 50 minutes, 31 seconds till closing!
C++ Programmers have private parts.
- add-hook sets hook globally if buffer-local hook is nil, Alan Shutko, 2003/10/21
- Re: add-hook sets hook globally if buffer-local hook is nil, Klaus Zeitler, 2003/10/22
- Re: add-hook sets hook globally if buffer-local hook is nil, Lute Kamstra, 2003/10/22
- Re: add-hook sets hook globally if buffer-local hook is nil, Klaus Zeitler, 2003/10/22
- Re: add-hook sets hook globally if buffer-local hook is nil,
Alan Shutko <=
- Re: add-hook sets hook globally if buffer-local hook is nil, Stefan Monnier, 2003/10/22
- Re: add-hook sets hook globally if buffer-local hook is nil, Lute Kamstra, 2003/10/22
- Re: add-hook sets hook globally if buffer-local hook is nil, Richard Stallman, 2003/10/23
- Re: add-hook sets hook globally if buffer-local hook is nil, Stefan Monnier, 2003/10/23
- Re: add-hook sets hook globally if buffer-local hook is nil, Richard Stallman, 2003/10/24
- Re: add-hook sets hook globally if buffer-local hook is nil, Stefan Monnier, 2003/10/26