* gnus-util.el (gnus-run-mode-hooks): New function.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 27 May 2005 03:24:27 +0000 (03:24 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 27 May 2005 03:24:27 +0000 (03:24 +0000)
* 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.

lisp/ChangeLog
lisp/dgnushack.el
lisp/gnus-util.el
lisp/score-mode.el

index 473a608..d50e408 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
+       * 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  <teirllm@auburn.edu>
 
        * gnus-agent.el (gnus-agent-make-mode-line-string):
index 032343b..0cce275 100644 (file)
@@ -1,5 +1,6 @@
 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
+;; 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -79,7 +80,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)
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
index 4d5d293..c537012 100644 (file)
@@ -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 <larsi@gnus.org>
 ;; 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 @@ 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)