diff options
author | Marcin Borkowski <mbork@mbork.pl> | 2016-03-25 16:26:08 +0100 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2016-03-25 16:26:31 +0100 |
commit | 2812099bcc1449b126d3435b05c2ad3d19b6c1a1 (patch) | |
tree | 66f43ef4fbe883b31b7a15a3ef9cf2a8f6224598 /lisp/calendar/parse-time.el | |
parent | c62371c23bde6c5cd4b0c711ff1754a8809a63d3 (diff) | |
download | emacs-2812099bcc1449b126d3435b05c2ad3d19b6c1a1.tar.gz |
Doc string fix
* lisp/calendar/parse-time.el (parse-time-tokenize): Clarify
doc string and clean up code.
Diffstat (limited to 'lisp/calendar/parse-time.el')
-rw-r--r-- | lisp/calendar/parse-time.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 6ba26a4a00d..c17d04a8c10 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -48,7 +48,9 @@ ((eq char ?:) ?d))) (defun parse-time-tokenize (string) - "Tokenize STRING into substrings." + "Tokenize STRING into substrings. +Each substring is a run of \"valid\" characters, i.e., lowercase +letters, digits, plus or minus signs or colons." (let ((start nil) (end (length string)) (all-digits nil) @@ -59,7 +61,8 @@ (while (and (< index end) ;Skip invalid characters. (not (setq c (parse-time-string-chars (aref string index))))) (cl-incf index)) - (setq start index all-digits (eq c ?0)) + (setq start index + all-digits (eq c ?0)) (while (and (< (cl-incf index) end) ;Scan valid characters. (setq c (parse-time-string-chars (aref string index)))) (setq all-digits (and all-digits (eq c ?0)))) |