From: Stefan Monnier Date: Tue, 23 Oct 2012 22:11:06 +0000 (+0000) Subject: Cleanup uses of "-hooks" X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=7064a5391faea8140cfb60959bbc9dfcdd318780 Cleanup uses of "-hooks" * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ccf43596..c636ffafc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-10-23 Stefan Monnier + + * 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 * gnus-art.el: Require gnus-util because it uses diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 442ed5297..7514e7ae6 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -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 () diff --git a/lisp/nndiary.el b/lisp/nndiary.el index 8752972c3..73dd2921b 100644 --- a/lisp/nndiary.el +++ b/lisp/nndiary.el @@ -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)) diff --git a/texi/gnus.texi b/texi/gnus.texi index 2b8932010..e24a7977f 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -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