From 71c78f01ad177f731fdf51f26809fec7d24de757 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 Nov 1998 23:44:10 +0000 Subject: [PATCH] (make-local-hook): Return the hook variable. --- lisp/subr.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- 2.39.5