From: Richard M. Stallman Date: Mon, 30 Nov 1998 23:44:10 +0000 (+0000) Subject: (make-local-hook): Return the hook variable. X-Git-Tag: emacs-20.4~1163 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71c78f01ad177f731fdf51f26809fec7d24de757;p=emacs.git (make-local-hook): Return the hook variable. --- diff --git a/lisp/subr.el b/lisp/subr.el index 63ea674a1c1..46939a0b4ad 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -566,6 +566,8 @@ Please convert your programs to use the variable `baud-rate' directly." (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 @@ Do not use `make-local-variable' to make a hook variable buffer-local." 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.