summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-util.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/gnus-util.el')
-rw-r--r--lisp/gnus/gnus-util.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index b3f73d71fd5..30bc72b2348 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1290,6 +1290,11 @@ ARG is passed to the first function."
(save-current-buffer
(apply 'run-hooks funcs)))
+(defun gnus-run-hook-with-args (hook &rest args)
+ "Does the same as `run-hook-with-args', but saves the current buffer."
+ (save-current-buffer
+ (apply 'run-hook-with-args hook args)))
+
(defun gnus-run-mode-hooks (&rest funcs)
"Run `run-mode-hooks' if it is available, otherwise `run-hooks'.
This function saves the current buffer."