Commit f008086f authored by Andreas Schwab's avatar Andreas Schwab
Browse files

* calendar/parse-time.el (parse-time-string): Allow extractor to

return nil.
parent d268b4fe
2012-02-25 Andreas Schwab <>
* calendar/parse-time.el (parse-time-string): Allow extractor to
return nil.
2012-02-25 Michael Albinus <> 2012-02-25 Michael Albinus <>
* net/tramp.el (tramp-file-name-for-operation): Add * net/tramp.el (tramp-file-name-for-operation): Add
...@@ -193,28 +193,29 @@ unknown are returned as nil." ...@@ -193,28 +193,29 @@ unknown are returned as nil."
(predicate (pop rule)) (predicate (pop rule))
(parse-time-val)) (parse-time-val))
(when (and (not (nth (car slots) time)) ;not already set (when (and (not (nth (car slots) time)) ;not already set
(setq parse-time-val (cond ((and (consp predicate) (setq parse-time-val
(not (eq (car predicate) (cond ((and (consp predicate)
'lambda))) (not (eq (car predicate)
(and (numberp parse-time-elt) 'lambda)))
(<= (car predicate) parse-time-elt) (and (numberp parse-time-elt)
(<= parse-time-elt (cadr predicate)) (<= (car predicate) parse-time-elt)
parse-time-elt)) (<= parse-time-elt (cadr predicate))
((symbolp predicate) parse-time-elt))
(cdr (assoc parse-time-elt ((symbolp predicate)
(symbol-value predicate)))) (cdr (assoc parse-time-elt
((funcall predicate))))) (symbol-value predicate))))
((funcall predicate)))))
(setq exit t) (setq exit t)
(while slots (while slots
(let ((new-val (and rule (let ((new-val (if rule
(let ((this (pop rule))) (let ((this (pop rule)))
(if (vectorp this) (if (vectorp this)
(parse-integer (parse-integer
parse-time-elt parse-time-elt
(aref this 0) (aref this 1)) (aref this 0) (aref this 1))
(funcall this)))))) (funcall this)))
(rplaca (nthcdr (pop slots) time) parse-time-val)))
(or new-val parse-time-val))))))))) (rplaca (nthcdr (pop slots) time) new-val))))))))
time)) time))
(provide 'parse-time) (provide 'parse-time)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment