From: Richard M. Stallman Date: Sat, 19 Feb 1994 02:05:53 +0000 (+0000) Subject: (calendar-string-to-mayan-long-count): Don't X-Git-Tag: emacs-19.34~9846 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cd96b42c523ce42841085b7f9005ca6bf498fac;p=emacs.git (calendar-string-to-mayan-long-count): Don't assume that periods must end numbers. Look for digit runs explicitly. --- diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index ab605f3ab4a..f1c508a22c2 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el @@ -102,11 +102,12 @@ research. Using 1232041 will give you the correlation used by Spinden.") (condition-case condition (progn (while (< cc c) - (let ((datum (read-from-string str cc))) - (if (not (integerp (car datum))) - (signal 'invalid-read-syntax (car datum)) - (setq rlc (cons (car datum) rlc)) - (setq cc (cdr datum))))) + (let* ((start (string-match "[0-9]+" str cc)) + (end (match-end 0)) + datum) + (setq datum (read (substring str start end))) + (setq rlc (cons datum rlc)) + (setq cc end))) (if (not (= (length rlc) 5)) (signal 'invalid-read-syntax nil))) (invalid-read-syntax nil)) (reverse rlc)))