[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: |
Stefan Monnier |
Subject: |
Re: add-hook sets hook globally if buffer-local hook is nil |
Date: |
22 Oct 2003 09:30:03 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>> 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.
Where is it documented exactly ? Could you quote the text you're
referring to ?
> Gack, that's even worse.
Indeed, I think it's a bug. It's introduced by the change below
which I think should be reverted. What was the reason for the change ?
Stefan
@@ -856,9 +870,7 @@
(set (make-local-variable hook) (list t)))
;; Detect the case where make-local-variable was used on a hook
;; and do what we used to do.
- (when (and (local-variable-p hook)
- (not (and (consp (symbol-value hook))
- (memq t (symbol-value hook)))))
+ (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook)))
(setq local t)))
(let ((hook-value (if local (symbol-value hook) (default-value hook))))
;; If the hook value is a single function, turn it into a list.
- 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, 2003/10/22
- Re: add-hook sets hook globally if buffer-local hook is nil,
Stefan Monnier <=
- 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