[gnus git] branch master updated: m0-5-9-g9087abc =1= legacy-gnus-agent.el (gnus-agent-unhook-expire-days), gnus-demon.el (gnus-demon-init): Don't bother with type-of

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  9087abc47595023cdb353d50951e712da56f0711 (commit)
      from  ea4986256b5af077008d52ee4299847bf28fc7d9 (commit)


- Log -----------------------------------------------------------------
commit 9087abc47595023cdb353d50951e712da56f0711
Author: Stefan Monnier <[email protected]>
Date:   Sun May 27 00:43:49 2012 +0000

    legacy-gnus-agent.el (gnus-agent-unhook-expire-days), gnus-demon.el (gnus-demon-init): Don't bother with type-of

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 536bb2e..7f8e0f9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-26  Stefan Monnier  <[email protected]>
+
+	* legacy-gnus-agent.el (gnus-agent-unhook-expire-days):
+	* gnus-demon.el (gnus-demon-init): Don't bother with type-of.
+
 2012-05-25  Stefan Monnier  <[email protected]>
 
 	* gnus-win.el (gnus-configure-frame): Don't signal an error when
diff --git a/lisp/gnus-demon.el b/lisp/gnus-demon.el
index c742e1f..115c577 100644
--- a/lisp/gnus-demon.el
+++ b/lisp/gnus-demon.el
@@ -133,7 +133,6 @@ marked with SPECIAL."
     ;; Set up the timer.
     (let* ((func (nth 0 handler))
            (time (nth 1 handler))
-           (time-type (type-of time))
            (idle (nth 2 handler))
            ;; Compute time according with timestep.
            ;; If t, replace by 1
@@ -157,11 +156,11 @@ marked with SPECIAL."
               (run-with-idle-timer idle t 'gnus-demon-run-callback func))
              ;; (func number any)
              ;; Call every `time'
-             ((eq time-type 'integer)
+             ((integerp time)
               (run-with-timer time time 'gnus-demon-run-callback
 			      func idle time))
              ;; (func string any)
-             ((eq time-type 'string)
+             ((stringp time)
               (run-with-timer time (* 24 60 60) 'gnus-demon-run-callback
 			      func idle)))))
       (when timer
diff --git a/lisp/legacy-gnus-agent.el b/lisp/legacy-gnus-agent.el
index afbebbf..ecde35d 100644
--- a/lisp/legacy-gnus-agent.el
+++ b/lisp/legacy-gnus-agent.el
@@ -206,29 +206,31 @@ converted to the compressed format."
 (gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t)
 
 (defun gnus-agent-unhook-expire-days (converting-to)
-  "Remove every lambda from gnus-group-prepare-hook that mention the
-symbol gnus-agent-do-once in their definition.  This should NOT be
+  "Remove every lambda from `gnus-group-prepare-hook' that mention the
+symbol `gnus-agent-do-once' in their definition.  This should NOT be
 necessary as gnus-agent.el no longer adds them.  However, it is
 possible that the hook was persistently saved."
-    (let ((h t)) ; iterate from bgn of hook
+    (let ((h t)) ; Iterate from bgn of hook.
       (while h
         (let ((func (progn (when (eq h t)
-                             ;; init h to list of functions
+                             ;; Init h to list of functions.
                              (setq h (cond ((listp gnus-group-prepare-hook)
                                             gnus-group-prepare-hook)
                                            ((boundp 'gnus-group-prepare-hook)
                                             (list gnus-group-prepare-hook)))))
                            (pop h))))
 
-          (when (cond ((eq (type-of func) 'compiled-function)
-                       ;; Search def. of compiled function for gnus-agent-do-once string
+          (when (cond ((byte-code-function-p func)
+                       ;; Search def. of compiled function for
+                       ;; gnus-agent-do-once string.
                        (let* (definition
                                print-level
                                print-length
                                (standard-output
                                 (lambda (char)
                                   (setq definition (cons char definition)))))
-                         (princ func) ; populates definition with reversed list of characters
+                         (princ func) ; Populates definition with reversed list
+				      ; of characters.
                          (let* ((i (length definition))
                                 (s (make-string i 0)))
                            (while definition
@@ -236,7 +238,7 @@ possible that the hook was persistently saved."
 
                            (string-match "\\bgnus-agent-do-once\\b" s))))
                       ((listp func)
-                       (eq (cadr (nth 2 func)) 'gnus-agent-do-once) ; handles eval'd lambda
+                       (eq (cadr (nth 2 func)) 'gnus-agent-do-once) ; Handles eval'd lambda.
                        ))
 
             (remove-hook 'gnus-group-prepare-hook func)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog            |    5 +++++
 lisp/gnus-demon.el        |    5 ++---
 lisp/legacy-gnus-agent.el |   18 ++++++++++--------
 3 files changed, 17 insertions(+), 11 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.