Cleanup uses of "-hooks"
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 23 Oct 2012 22:11:06 +0000 (22:11 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 23 Oct 2012 22:11:06 +0000 (22:11 +0000)
* nndiary.el (nndiary-request-create-group-functions)
  (nndiary-request-update-info-functions)
  (nndiary-request-accept-article-functions):
* gnus-start.el (gnus-subscribe-newsgroup-functions):
  Don't use "-hooks" suffix.

* gnus.texi (Group Parameters): Fix variable form.

lisp/ChangeLog
lisp/gnus-start.el
lisp/nndiary.el
texi/gnus.texi

index 7ccf435..c636ffa 100644 (file)
@@ -1,3 +1,11 @@
+2012-10-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * nndiary.el (nndiary-request-create-group-functions)
+       (nndiary-request-update-info-functions)
+       (nndiary-request-accept-article-functions):
+       * gnus-start.el (gnus-subscribe-newsgroup-functions): Don't use
+       "-hooks" suffix.
+
 2012-10-19  Julien Danjou  <julien@danjou.info>
 
        * gnus-art.el: Require gnus-util because it uses
index 442ed52..7514e7a 100644 (file)
@@ -291,7 +291,9 @@ claim them."
                function
                (repeat function)))
 
-(defcustom gnus-subscribe-newsgroup-hooks nil
+(define-obsolete-variable-alias 'gnus-subscribe-newsgroup-hooks
+  'gnus-subscribe-newsgroup-functions "24.3")
+(defcustom gnus-subscribe-newsgroup-functions nil
   "*Hooks run after you subscribe to a new group.
 The hooks will be called with new group's name as argument."
   :version "22.1"
@@ -639,7 +641,7 @@ the first newsgroup."
      gnus-level-killed (gnus-group-entry (or next "dummy.group")))
     (gnus-request-update-group-status newsgroup 'subscribe)
     (gnus-message 5 "Subscribe newsgroup: %s" newsgroup)
-    (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup)
+    (run-hook-with-args 'gnus-subscribe-newsgroup-functions newsgroup)
     t))
 
 (defun gnus-read-active-file-p ()
index 8752972..73dd292 100644 (file)
@@ -179,22 +179,28 @@ In order to make this clear, here are some examples:
   :group 'nndiary)
 
 
-(defcustom nndiary-request-create-group-hooks nil
-  "*Hooks to run after `nndiary-request-create-group' is executed.
-The hooks will be called with the full group name as argument."
+(define-obsolete-variable-alias 'nndiary-request-create-group-hooks
+  'nndiary-request-create-group-functions "24.3")
+(defcustom nndiary-request-create-group-functions nil
+  "*Hook run after `nndiary-request-create-group' is executed.
+The hook functions will be called with the full group name as argument."
   :group 'nndiary
   :type 'hook)
 
-(defcustom nndiary-request-update-info-hooks nil
-  "*Hooks to run after `nndiary-request-update-info-group' is executed.
-The hooks will be called with the full group name as argument."
+(define-obsolete-variable-alias 'nndiary-request-update-info-hooks
+  'nndiary-request-update-info-functions "24.3")
+(defcustom nndiary-request-update-info-functions nil
+  "*Hook run after `nndiary-request-update-info-group' is executed.
+The hook functions will be called with the full group name as argument."
   :group 'nndiary
   :type 'hook)
 
-(defcustom nndiary-request-accept-article-hooks nil
-  "*Hooks to run before accepting an article.
+(define-obsolete-variable-alias 'nndiary-request-accept-article-hooks
+  'nndiary-request-accept-article-functions "24.3")
+(defcustom nndiary-request-accept-article-functions nil
+  "*Hook run before accepting an article.
 Executed near the beginning of `nndiary-request-accept-article'.
-The hooks will be called with the article in the current buffer."
+The hook functions will be called with the article in the current buffer."
   :group 'nndiary
   :type 'hook)
 
@@ -541,7 +547,7 @@ all.  This may very well take some time.")
          (setcar active (apply 'min articles))
          (setcdr active (apply 'max articles))))
       (nnmail-save-active nndiary-group-alist nndiary-active-file)
-      (run-hook-with-args 'nndiary-request-create-group-hooks
+      (run-hook-with-args 'nndiary-request-create-group-functions
                          (gnus-group-prefixed-name group
                                                    (list "nndiary" server)))
       t))
@@ -633,7 +639,7 @@ all.  This may very well take some time.")
 (deffoo nndiary-request-accept-article (group &optional server last)
   (nndiary-possibly-change-directory group server)
   (nnmail-check-syntax)
-  (run-hooks 'nndiary-request-accept-article-hooks)
+  (run-hooks 'nndiary-request-accept-article-functions)
   (when (nndiary-schedule)
     (let (result)
       (when nnmail-cache-accepted-message-ids
@@ -804,7 +810,7 @@ all.  This may very well take some time.")
             (gnus-info-set-read info (gnus-update-read-articles
                                       (gnus-info-group info) unread t)))
        ))
-    (run-hook-with-args 'nndiary-request-update-info-hooks
+    (run-hook-with-args 'nndiary-request-update-info-functions
                        (gnus-info-group info))
     t))
 
index 2b89320..e24a797 100644 (file)
@@ -3148,7 +3148,7 @@ following is added to a group parameter
 
 @lisp
 (gnus-summary-prepared-hook
-  '(lambda nil (local-set-key "d" (local-key-binding "n"))))
+  (lambda nil (local-set-key "d" (local-key-binding "n"))))
 @end lisp
 
 when the group is entered, the 'd' key will not mark the article as