changeset 62890:4b7fa3ee8e9e

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 74-75) - Merge from emacs--cvs-trunk--0 - Update from CVS 2005-05-30 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks. (gnus-carpal-mode): Ditto. * lisp/gnus/gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks. (gnus-browse-mode): Ditto. * lisp/gnus/gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-util.el (gnus-run-mode-hooks): Save current buffer.
author Miles Bader <miles@gnu.org>
date Mon, 30 May 2005 08:20:19 +0000
parents 9282bd25c87b
children 58c1e48ab7bc
files lisp/gnus/ChangeLog lisp/gnus/gnus-agent.el lisp/gnus/gnus-art.el lisp/gnus/gnus-cus.el lisp/gnus/gnus-eform.el lisp/gnus/gnus-group.el lisp/gnus/gnus-kill.el lisp/gnus/gnus-salt.el lisp/gnus/gnus-srvr.el lisp/gnus/gnus-sum.el lisp/gnus/gnus-util.el
diffstat 11 files changed, 46 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/ChangeLog	Mon May 30 08:20:19 2005 +0000
@@ -1,3 +1,27 @@
+2005-05-30  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks.
+
+	* gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks.
+
+	* gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks.
+
+	* gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks.
+
+	* gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks.
+
+	* gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks.
+
+	* gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks.
+	(gnus-carpal-mode): Ditto.
+
+	* gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks.
+	(gnus-browse-mode): Ditto.
+
+	* gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks.
+
+	* gnus-util.el (gnus-run-mode-hooks): Save current buffer.
+
 2005-05-29  Richard M. Stallman  <rms@gnu.org>
 
 	* gnus-cite.el (gnus-cite-add-face): Set overlay's evaporate property.
--- a/lisp/gnus/gnus-agent.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-agent.el	Mon May 30 08:20:19 2005 +0000
@@ -2552,7 +2552,7 @@
   (buffer-disable-undo)
   (setq truncate-lines t)
   (setq buffer-read-only t)
-  (gnus-run-hooks 'gnus-category-mode-hook))
+  (gnus-run-mode-hooks 'gnus-category-mode-hook))
 
 (defalias 'gnus-category-position-point 'gnus-goto-colon)
 
--- a/lisp/gnus/gnus-art.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Mon May 30 08:20:19 2005 +0000
@@ -3742,7 +3742,7 @@
   (setq buffer-read-only t)
   (set-syntax-table gnus-article-mode-syntax-table)
   (mm-enable-multibyte)
-  (gnus-run-hooks 'gnus-article-mode-hook))
+  (gnus-run-mode-hooks 'gnus-article-mode-hook))
 
 (defun gnus-article-setup-buffer ()
   "Initialize the article buffer."
--- a/lisp/gnus/gnus-cus.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-cus.el	Mon May 30 08:20:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; gnus-cus.el --- customization commands for Gnus
 ;;
-;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
@@ -67,7 +67,7 @@
     (set (make-local-variable 'widget-push-button-suffix) "")
     (set (make-local-variable 'widget-link-prefix) "")
     (set (make-local-variable 'widget-link-suffix) ""))
-  (gnus-run-hooks 'gnus-custom-mode-hook))
+  (gnus-run-mode-hooks 'gnus-custom-mode-hook))
 
 ;;; Group Customization:
 
--- a/lisp/gnus/gnus-eform.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-eform.el	Mon May 30 08:20:19 2005 +0000
@@ -1,5 +1,5 @@
 ;;; gnus-eform.el --- a mode for editing forms for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -83,7 +83,7 @@
   (use-local-map gnus-edit-form-mode-map)
   (make-local-variable 'gnus-edit-form-done-function)
   (make-local-variable 'gnus-prev-winconf)
-  (gnus-run-hooks 'gnus-edit-form-mode-hook))
+  (gnus-run-mode-hooks 'gnus-edit-form-mode-hook))
 
 (defun gnus-edit-form (form documentation exit-func)
   "Edit FORM in a new buffer.
--- a/lisp/gnus/gnus-group.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-group.el	Mon May 30 08:20:19 2005 +0000
@@ -1,5 +1,5 @@
 ;;; gnus-group.el --- group mode commands for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -1042,7 +1042,7 @@
     (gnus-undo-mode 1))
   (when gnus-slave
     (gnus-slave-mode))
-  (gnus-run-hooks 'gnus-group-mode-hook))
+  (gnus-run-mode-hooks 'gnus-group-mode-hook))
 
 (defun gnus-update-group-mark-positions ()
   (save-excursion
--- a/lisp/gnus/gnus-kill.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-kill.el	Mon May 30 08:20:19 2005 +0000
@@ -1,5 +1,5 @@
 ;;; gnus-kill.el --- kill commands for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -161,7 +161,7 @@
   (setq major-mode 'gnus-kill-file-mode)
   (setq mode-name "Kill")
   (lisp-mode-variables nil)
-  (gnus-run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook))
+  (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook))
 
 (defun gnus-kill-file-edit-file (newsgroup)
   "Begin editing a kill file for NEWSGROUP.
--- a/lisp/gnus/gnus-salt.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-salt.el	Mon May 30 08:20:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2001
+;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -496,7 +496,7 @@
     (gnus-set-work-buffer)
     (gnus-tree-node-insert (make-mail-header "") nil)
     (setq gnus-tree-node-length (1- (point))))
-  (gnus-run-hooks 'gnus-tree-mode-hook))
+  (gnus-run-mode-hooks 'gnus-tree-mode-hook))
 
 (defun gnus-tree-read-summary-keys (&optional arg)
   "Read a summary buffer key sequence and execute it."
@@ -1009,7 +1009,7 @@
   (buffer-disable-undo)
   (setq buffer-read-only t)
   (make-local-variable 'gnus-carpal-attached-buffer)
-  (gnus-run-hooks 'gnus-carpal-mode-hook))
+  (gnus-run-mode-hooks 'gnus-carpal-mode-hook))
 
 (defun gnus-carpal-setup-buffer (type)
   (let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))
--- a/lisp/gnus/gnus-srvr.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-srvr.el	Mon May 30 08:20:19 2005 +0000
@@ -1,5 +1,6 @@
 ;;; gnus-srvr.el --- virtual server support for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+;; 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -269,7 +270,7 @@
       (put 'gnus-server-mode 'font-lock-defaults '(gnus-server-font-lock-keywords t))
     (set (make-local-variable 'font-lock-defaults)
 	 '(gnus-server-font-lock-keywords t)))
-  (gnus-run-hooks 'gnus-server-mode-hook))
+  (gnus-run-mode-hooks 'gnus-server-mode-hook))
 
 (defun gnus-server-insert-server-line (gnus-tmp-name method)
   (let* ((gnus-tmp-how (car method))
@@ -849,7 +850,7 @@
   (setq truncate-lines t)
   (gnus-set-default-directory)
   (setq buffer-read-only t)
-  (gnus-run-hooks 'gnus-browse-mode-hook))
+  (gnus-run-mode-hooks 'gnus-browse-mode-hook))
 
 (defun gnus-browse-read-group (&optional no-article number)
   "Enter the group at the current line.
--- a/lisp/gnus/gnus-sum.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-sum.el	Mon May 30 08:20:19 2005 +0000
@@ -2722,7 +2722,7 @@
   (make-local-variable 'gnus-summary-mark-positions)
   (gnus-make-local-hook 'pre-command-hook)
   (add-hook 'pre-command-hook 'gnus-set-global-variables nil t)
-  (gnus-run-hooks 'gnus-summary-mode-hook)
+  (gnus-run-mode-hooks 'gnus-summary-mode-hook)
   (turn-on-gnus-mailing-list-mode)
   (mm-enable-multibyte)
   (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy)
--- a/lisp/gnus/gnus-util.el	Mon May 30 06:51:33 2005 +0000
+++ b/lisp/gnus/gnus-util.el	Mon May 30 08:20:19 2005 +0000
@@ -1016,10 +1016,11 @@
     (apply 'run-hooks funcs)))
 
 (defun gnus-run-mode-hooks (&rest funcs)
-  "Run `run-mode-hooks' if it is available.  Otherwise run `run-hooks'."
+  "Run `run-mode-hooks' if it is available, otherwise `run-hooks'.
+This function saves the current buffer."
   (if (fboundp 'run-mode-hooks)
-      (apply 'run-mode-hooks funcs)
-    (apply 'run-hooks funcs)))
+      (save-current-buffer (apply 'run-mode-hooks funcs))
+    (save-current-buffer (apply 'run-hooks funcs))))
 
 ;;; Various