From: Marcin Borkowski Date: Fri, 25 Mar 2016 15:26:08 +0000 (+0100) Subject: Doc string fix X-Git-Tag: emacs-26.0.90~2289 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2812099bcc1449b126d3435b05c2ad3d19b6c1a1;p=emacs.git Doc string fix * lisp/calendar/parse-time.el (parse-time-tokenize): Clarify doc string and clean up code. --- 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))))