# HG changeset patch # User Miles Bader # Date 1117166892 0 # Node ID a03b1bd1f66c25d02ee2a205feb93f3139df539a # Parent 0751d21ef87f638d22b82633bb8f1fd8a830325c Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-330 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 71-73) - Merge from emacs--cvs-trunk--0 - Update from CVS 2005-05-27 Katsumi Yamaoka * lisp/gnus/gnus-util.el (gnus-run-mode-hooks): New function. * lisp/gnus/score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks. diff -r 0751d21ef87f -r a03b1bd1f66c lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Fri May 27 02:57:18 2005 +0000 +++ b/lisp/gnus/ChangeLog Fri May 27 04:08:12 2005 +0000 @@ -1,3 +1,9 @@ +2005-05-27 Katsumi Yamaoka + + * 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 * gnus-agent.el (gnus-agent-make-mode-line-string): diff -r 0751d21ef87f -r a03b1bd1f66c lisp/gnus/gnus-util.el --- a/lisp/gnus/gnus-util.el Fri May 27 02:57:18 2005 +0000 +++ b/lisp/gnus/gnus-util.el Fri May 27 04:08:12 2005 +0000 @@ -1015,6 +1015,12 @@ (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 diff -r 0751d21ef87f -r a03b1bd1f66c lisp/gnus/score-mode.el --- a/lisp/gnus/score-mode.el Fri May 27 02:57:18 2005 +0000 +++ b/lisp/gnus/score-mode.el Fri May 27 04:08:12 2005 +0000 @@ -1,6 +1,6 @@ ;;; 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 ;; Keywords: news, mail @@ -28,7 +28,7 @@ (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.") @@ -71,7 +71,7 @@ (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)