[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: |
Richard Stallman |
Subject: |
Re: add-hook sets hook globally if buffer-local hook is nil |
Date: |
Thu, 23 Oct 2003 14:37:52 -0400 |
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.
i dont think this change causes the problem.
this code detects case where hook var has a local binding
and it wasnt made with add-hook.
i think thye change makes it safer.
- 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, 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 <=
- 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