From: yamaoka Date: Fri, 27 May 2005 03:29:32 +0000 (+0000) Subject: Synch to No Gnus 200505270324. X-Git-Tag: t-gnus-6_17_4-quimby-~486 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2a85048c0497a917e093c281fbd2aad3d92075f4;p=elisp%2Fgnus.git- Synch to No Gnus 200505270324. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a11478a..4289b20 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +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. + + * dgnushack.el: Advise byte-optimize-form-code-walker to avoid the + ``...called for effect'' warnings for Emacs 21.4 as well as 21.3. + 2005-05-26 Luc Teirlinck * gnus-agent.el (gnus-agent-make-mode-line-string): diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 2bf1051..95c85b0 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -1,6 +1,7 @@ ;;; dgnushack.el --- a hack to set the load path for byte-compiling ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005 Free Software Foundation, Inc. +;; 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Katsumi Yamaoka @@ -100,7 +101,7 @@ (when (and (not (featurep 'xemacs)) (= emacs-major-version 21) - (= emacs-minor-version 3) + (>= emacs-minor-version 3) (condition-case code (let ((byte-compile-error-on-warn t)) (byte-optimize-form (quote (pop x)) t) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 4805782..6d2f830 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1033,6 +1033,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 diff --git a/lisp/score-mode.el b/lisp/score-mode.el index a9715b5..9a15cfa 100644 --- a/lisp/score-mode.el +++ b/lisp/score-mode.el @@ -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)) (eval-when-compile (require 'static)) -(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.") @@ -70,7 +70,7 @@ This mode is an extended emacs-lisp mode. (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)