diff options
| author | Karl Heuer | 1995-07-25 19:35:38 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-07-25 19:35:38 +0000 |
| commit | a732d129712079c381d66994b135dbd20e1bfa36 (patch) | |
| tree | e99bdb34c85350cccddfdf135b3d5cec1b8aa93f | |
| parent | 488bedffb5efd9b361d25e80cd2129ce6aedeeb2 (diff) | |
| download | emacs-a732d129712079c381d66994b135dbd20e1bfa36.tar.gz emacs-a732d129712079c381d66994b135dbd20e1bfa36.zip | |
(run-hook-with-args): Deleted; now in C code.
| -rw-r--r-- | lisp/subr.el | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index c9239673c19..63e02ae26ca 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -478,35 +478,6 @@ To make a hook variable buffer-local, use `make-local-hook', not | |||
| 478 | (funcall value))))) | 478 | (funcall value))))) |
| 479 | (setq hooklist (cdr hooklist)))) | 479 | (setq hooklist (cdr hooklist)))) |
| 480 | 480 | ||
| 481 | (defun run-hook-with-args (hook &rest args) | ||
| 482 | "Run HOOK with the specified arguments ARGS. | ||
| 483 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | ||
| 484 | value, that value may be a function or a list of functions to be | ||
| 485 | called to run the hook. If the value is a function, it is called with | ||
| 486 | the given arguments and its return value is returned. If it is a list | ||
| 487 | of functions, those functions are called, in order, | ||
| 488 | with the given arguments ARGS. | ||
| 489 | It is best not to depend on the value return by `run-hook-with-args', | ||
| 490 | as that may change. | ||
| 491 | |||
| 492 | To make a hook variable buffer-local, use `make-local-hook', not | ||
| 493 | `make-local-variable'." | ||
| 494 | (and (boundp hook) | ||
| 495 | (symbol-value hook) | ||
| 496 | (let ((value (symbol-value hook))) | ||
| 497 | (if (and (listp value) (not (eq (car value) 'lambda))) | ||
| 498 | (while value | ||
| 499 | (if (eq (car value) t) | ||
| 500 | ;; t indicates this hook has a local binding; | ||
| 501 | ;; it means to run the global binding too. | ||
| 502 | (let ((functions (default-value hook))) | ||
| 503 | (while functions | ||
| 504 | (apply (car functions) args) | ||
| 505 | (setq functions (cdr functions)))) | ||
| 506 | (apply (car value) args)) | ||
| 507 | (setq value (cdr value))) | ||
| 508 | (apply value args))))) | ||
| 509 | |||
| 510 | (defun run-hook-with-args-until-success (hook &rest args) | 481 | (defun run-hook-with-args-until-success (hook &rest args) |
| 511 | "Run HOOK with the specified arguments ARGS. | 482 | "Run HOOK with the specified arguments ARGS. |
| 512 | HOOK should be a symbol, a hook variable. Its value should | 483 | HOOK should be a symbol, a hook variable. Its value should |