diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2016-02-28 15:34:33 +1030 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2016-02-28 15:34:33 +1030 |
commit | 3ac844be4ec66728f33b3651f7cc87c4601dcc49 (patch) | |
tree | 26525faa45872b2fb0c6b7f9b3e49036e61eb52a /lisp/calendar/parse-time.el | |
parent | 12d10d2599d5ce56880aad40529614a715454fe8 (diff) | |
download | emacs-3ac844be4ec66728f33b3651f7cc87c4601dcc49.tar.gz |
Clean up the code in parse-time-string-chars
* lisp/calendar/parse-time.el (parse-time-string-chars):
Clean up the code a bit.
Diffstat (limited to 'lisp/calendar/parse-time.el')
-rw-r--r-- | lisp/calendar/parse-time.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index fd26e772b57..6ba26a4a00d 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -41,13 +41,11 @@ (defvar parse-time-val) (defsubst parse-time-string-chars (char) - (save-match-data - (let (str) - (cond ((eq char ?+) 1) - ((eq char ?-) -1) - ((eq char ?:) ?d) - ((string-match "[[:lower:]]" (setq str (string char))) ?a) - ((string-match "[[:digit:]]" str) ?0))))) + (cond ((<= ?a char ?z) ?a) + ((<= ?0 char ?9) ?0) + ((eq char ?+) 1) + ((eq char ?-) -1) + ((eq char ?:) ?d))) (defun parse-time-tokenize (string) "Tokenize STRING into substrings." |