+2005-05-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-util.el (gnus-run-mode-hooks): New function.
+
+ * score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks.
+
2005-05-26 Luc Teirlinck <teirllm@auburn.edu>
* gnus-agent.el (gnus-agent-make-mode-line-string):
(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
;;; score-mode.el --- mode for editing Gnus score files
-;; Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001, 2004, 2005 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
(eval-when-compile (require 'cl))
(require 'mm-util) ; for mm-universal-coding-system
-(require 'gnus-util) ; for gnus-pp
+(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks
(defvar gnus-score-mode-hook nil
"*Hook run in score mode buffers.")
(setq mode-name "Score")
(lisp-mode-variables nil)
(make-local-variable 'gnus-score-edit-exit-function)
- (run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
+ (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
(defun gnus-score-make-menu-bar ()
(unless (boundp 'gnus-score-menu)