[gnus git] branch no-gnus updated: m0-1-74-g9e4f0f8 =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  9e4f0f845a97649bdeff35ef0356314d079a9383 (commit)
      from  c259392dfe4cb4c62b6ec388c384be8b55519214 (commit)


- Log -----------------------------------------------------------------
commit 9e4f0f845a97649bdeff35ef0356314d079a9383
Author: Andreas Schwab <[email protected]>
Date:   Sat Feb 25 13:18:09 2012 +0000

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

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f1e51f8..7e08268 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, no-gnus 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.