diff options
| author | Richard M. Stallman | 1994-02-19 02:05:53 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-02-19 02:05:53 +0000 |
| commit | 7cd96b42c523ce42841085b7f9005ca6bf498fac (patch) | |
| tree | 6c325f98852c6fbd9697007acd307fb19e62adfb | |
| parent | 44d798af465ed1d3ca9ccd11d40199a196c77213 (diff) | |
| download | emacs-7cd96b42c523ce42841085b7f9005ca6bf498fac.tar.gz emacs-7cd96b42c523ce42841085b7f9005ca6bf498fac.zip | |
(calendar-string-to-mayan-long-count): Don't
assume that periods must end numbers. Look for digit runs explicitly.
| -rw-r--r-- | lisp/calendar/cal-mayan.el | 11 |
1 files changed, 6 insertions, 5 deletions
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.") | |||
| 102 | (condition-case condition | 102 | (condition-case condition |
| 103 | (progn | 103 | (progn |
| 104 | (while (< cc c) | 104 | (while (< cc c) |
| 105 | (let ((datum (read-from-string str cc))) | 105 | (let* ((start (string-match "[0-9]+" str cc)) |
| 106 | (if (not (integerp (car datum))) | 106 | (end (match-end 0)) |
| 107 | (signal 'invalid-read-syntax (car datum)) | 107 | datum) |
| 108 | (setq rlc (cons (car datum) rlc)) | 108 | (setq datum (read (substring str start end))) |
| 109 | (setq cc (cdr datum))))) | 109 | (setq rlc (cons datum rlc)) |
| 110 | (setq cc end))) | ||
| 110 | (if (not (= (length rlc) 5)) (signal 'invalid-read-syntax nil))) | 111 | (if (not (= (length rlc) 5)) (signal 'invalid-read-syntax nil))) |
| 111 | (invalid-read-syntax nil)) | 112 | (invalid-read-syntax nil)) |
| 112 | (reverse rlc))) | 113 | (reverse rlc))) |