* gnus-util.el (gnus-run-mode-hooks): New function.
[gnus] / lisp / gnus-util.el
index 8e49234..1e2ea94 100644 (file)
@@ -1008,6 +1008,12 @@ ARG is passed to the first function."
   (save-current-buffer
     (apply 'run-hooks funcs)))
 
+(defun gnus-run-mode-hooks (&rest funcs)
+  "Run `run-mode-hooks' if it is available.  Otherwise run `run-hooks'."
+  (if (fboundp 'run-mode-hooks)
+      (apply 'run-mode-hooks funcs)
+    (apply 'run-hooks funcs)))
+
 ;;; Various
 
 (defvar gnus-group-buffer)             ; Compiler directive