diff options
| author | Chong Yidong | 2009-08-16 18:38:15 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-08-16 18:38:15 +0000 |
| commit | 81b1f9c9b79e05111fa5bc0fb8711e7d54067d14 (patch) | |
| tree | 2efed5b078b0da62d2fcb101feb10f9c33fdd040 | |
| parent | 4f22e84d746e3614752d99f9638d1a55ac21e230 (diff) | |
| download | emacs-81b1f9c9b79e05111fa5bc0fb8711e7d54067d14.tar.gz emacs-81b1f9c9b79e05111fa5bc0fb8711e7d54067d14.zip | |
* calendar/parse-time.el (parse-time-string-chars): Save match data.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calendar/parse-time.el | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c323349f72..341e2380381 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-08-16 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * calendar/parse-time.el (parse-time-string-chars): Save match | ||
| 4 | data. | ||
| 5 | |||
| 1 | 2009-08-16 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2009-08-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * progmodes/sql.el (sql-product-alist): Add :name tag to entries. | 8 | * progmodes/sql.el (sql-product-alist): Add :name tag to entries. |
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 27a71269281..56a2fd715d2 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el | |||
| @@ -51,13 +51,14 @@ | |||
| 51 | (aref parse-time-digits char)) | 51 | (aref parse-time-digits char)) |
| 52 | 52 | ||
| 53 | (defsubst parse-time-string-chars (char) | 53 | (defsubst parse-time-string-chars (char) |
| 54 | (let (case-fold-search str) | 54 | (save-match-data |
| 55 | (cond ((eq char ?+) 1) | 55 | (let (case-fold-search str) |
| 56 | ((eq char ?-) -1) | 56 | (cond ((eq char ?+) 1) |
| 57 | ((eq char ?:) ?d) | 57 | ((eq char ?-) -1) |
| 58 | ((string-match "[[:upper:]]" (setq str (string char))) ?A) | 58 | ((eq char ?:) ?d) |
| 59 | ((string-match "[[:lower:]]" str) ?a) | 59 | ((string-match "[[:upper:]]" (setq str (string char))) ?A) |
| 60 | ((string-match "[[:digit:]]" str) ?0)))) | 60 | ((string-match "[[:lower:]]" str) ?a) |
| 61 | ((string-match "[[:digit:]]" str) ?0))))) | ||
| 61 | 62 | ||
| 62 | (put 'parse-error 'error-conditions '(parse-error error)) | 63 | (put 'parse-error 'error-conditions '(parse-error error)) |
| 63 | (put 'parse-error 'error-message "Parsing error") | 64 | (put 'parse-error 'error-message "Parsing error") |