diff options
| author | Richard M. Stallman | 1998-11-30 23:44:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-11-30 23:44:10 +0000 |
| commit | 71c78f01ad177f731fdf51f26809fec7d24de757 (patch) | |
| tree | 874d2036f3d06741978f06bb3719ceda0defdb72 | |
| parent | 183040ff191767b4d43c8e4993a0ab5a86a8fba5 (diff) | |
| download | emacs-71c78f01ad177f731fdf51f26809fec7d24de757.tar.gz emacs-71c78f01ad177f731fdf51f26809fec7d24de757.zip | |
(make-local-hook): Return the hook variable.
| -rw-r--r-- | lisp/subr.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 566 | 566 | ||
| 567 | (defun make-local-hook (hook) | 567 | (defun make-local-hook (hook) |
| 568 | "Make the hook HOOK local to the current buffer. | 568 | "Make the hook HOOK local to the current buffer. |
| 569 | The return value is HOOK. | ||
| 570 | |||
| 569 | When a hook is local, its local and global values | 571 | When a hook is local, its local and global values |
| 570 | work in concert: running the hook actually runs all the hook | 572 | work in concert: running the hook actually runs all the hook |
| 571 | functions listed in *either* the local value *or* the global value | 573 | 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." | |||
| 586 | nil | 588 | nil |
| 587 | (or (boundp hook) (set hook nil)) | 589 | (or (boundp hook) (set hook nil)) |
| 588 | (make-local-variable hook) | 590 | (make-local-variable hook) |
| 589 | (set hook (list t)))) | 591 | (set hook (list t))) |
| 592 | hook) | ||
| 590 | 593 | ||
| 591 | (defun add-hook (hook function &optional append local) | 594 | (defun add-hook (hook function &optional append local) |
| 592 | "Add to the value of HOOK the function FUNCTION. | 595 | "Add to the value of HOOK the function FUNCTION. |