[librep] Minor change in "remove-hook-by-name".



commit 79625b072964024ca59a9a73e8a1d81a0dfa7b71
Author: Teika kazura <teika lavabit com>
Date:   Sat Feb 5 20:52:06 2011 +0900

    Minor change in "remove-hook-by-name".
    
    It now relies on "function-name".

 lisp/rep/system.jl |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/lisp/rep/system.jl b/lisp/rep/system.jl
index 9baed0d..72dd432 100644
--- a/lisp/rep/system.jl
+++ b/lisp/rep/system.jl
@@ -24,6 +24,7 @@
 (declare (in-module rep.system))
 
 (open-structures '(rep.lang.symbols
+		   rep.lang.interpreter
 		   rep.data
 		   rep.io.files))
 
@@ -45,15 +46,9 @@ is true in which case it is added at the end."
   (set hook (delete func (symbol-value hook))))
 
 (defun remove-hook-by-name (hook name)
-  "Remove functions whose name is NAME (a string) from HOOK (a symbol)."
-  (when (symbolp name)
-    (setq name (symbol-name name)))
+  "Remove functions whose name is NAME from HOOK (a symbol)."
   (set hook (delete-if (lambda (f)
-			 (equal (or (and (closurep f)
-					 (closure-name f))
-				    (and (subrp f)
-					 (subr-name f)))
-				name))
+			 (eq (function-name f) name))
 		       (symbol-value hook))))
 
 (defun in-hook-p (hook-symbol fun)



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