[gnus git] branch master updated: m0-3-49-g3a8b9e5 =1= parse-time.el (parse-time-string): Allow extractor to return nil.

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  3a8b9e5acd494eb22321d96042076a1565dda99a (commit)
      from  28ac71eb9f37da5a6193a8e4dab61ab06b17f466 (commit)


- Log -----------------------------------------------------------------
commit 3a8b9e5acd494eb22321d96042076a1565dda99a
Author: Andreas Schwab <[email protected]>
Date:   Sat Feb 25 13:18:12 2012 +0000

    parse-time.el (parse-time-string): Allow extractor to return nil.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bf476f3..fec9e3f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,10 @@
 
 	* shr.el (shr-column-specs): Protect against TDs with "width: 0%".
 
+2012-02-25  Andreas Schwab  <[email protected]>
+
+	* parse-time.el (parse-time-string): Allow extractor to return nil.
+
 2012-02-23  Katsumi Yamaoka  <[email protected]>
 
 	* nntp.el (nntp-send-authinfo): Work for secure nntp entry in authinfo.
diff --git a/lisp/parse-time.el b/lisp/parse-time.el
index c731094..afaf1eb 100644
--- a/lisp/parse-time.el
+++ b/lisp/parse-time.el
@@ -213,7 +213,8 @@ unknown are returned as nil."
 		 (predicate (pop rule))
 		 (parse-time-val))
 	    (when (and (not (nth (car slots) time)) ;not already set
-		       (setq parse-time-val (cond ((and (consp predicate)
+		       (setq parse-time-val
+			     (cond ((and (consp predicate)
 					     (not (eq (car predicate)
 						      'lambda)))
 					(and (numberp parse-time-elt)
@@ -226,15 +227,15 @@ unknown are returned as nil."
 				       ((funcall predicate)))))
 	      (setq exit t)
 	      (while slots
-		(let ((new-val (and rule
+		(let ((new-val (if rule
 				    (let ((this (pop rule)))
 				      (if (vectorp this)
 					  (parse-integer
 					   parse-time-elt
 					   (aref this 0) (aref this 1))
-					(funcall this))))))
-		  (rplaca (nthcdr (pop slots) time)
-			  (or new-val parse-time-val)))))))))
+				       (funcall this)))
+				 parse-time-val)))
+		  (rplaca (nthcdr (pop slots) time) new-val))))))))
     time))
 
 (provide 'parse-time)

-----------------------------------------------------------------------
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     |    4 ++++
 lisp/parse-time.el |   41 +++++++++++++++++++++--------------------
 2 files changed, 25 insertions(+), 20 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.