changeset 23786:673204d56938

(make-local-hook): Return the hook variable.
author Richard M. Stallman <rms@gnu.org>
date Mon, 30 Nov 1998 23:44:10 +0000
parents ef0150f917c9
children 2bb8777a3ba7
files lisp/subr.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Mon Nov 30 23:29:13 1998 +0000
+++ b/lisp/subr.el	Mon Nov 30 23:44:10 1998 +0000
@@ -566,6 +566,8 @@
 
 (defun make-local-hook (hook)
   "Make the hook HOOK local to the current buffer.
+The return value is HOOK.
+
 When a hook is local, its local and global values
 work in concert: running the hook actually runs all the hook
 functions listed in *either* the local value *or* the global value
@@ -586,7 +588,8 @@
       nil
     (or (boundp hook) (set hook nil))
     (make-local-variable hook)
-    (set hook (list t))))
+    (set hook (list t)))
+  hook)
 
 (defun add-hook (hook function &optional append local)
   "Add to the value of HOOK the function FUNCTION.