diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2016-02-26 14:00:06 +1030 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2016-02-26 14:00:06 +1030 |
commit | 4861b50e439443a1ba8a867c88faf28ae3737706 (patch) | |
tree | 7a8d9aaef362b7ea0c05f633f9d6e4529adeb285 | |
parent | a1e7304fc45ed356f35459697ea8415d52008fd8 (diff) | |
download | emacs-4861b50e439443a1ba8a867c88faf28ae3737706.tar.gz |
Make parse-time-string-chars more efficient
* lisp/calendar/parse-time.el (parse-time-string-chars): The
string has already been downcase, so don't care about case
(bug#18522).
-rw-r--r-- | lisp/calendar/parse-time.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 4086d236557..fd26e772b57 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -42,12 +42,11 @@ (defsubst parse-time-string-chars (char) (save-match-data - (let (case-fold-search str) + (let (str) (cond ((eq char ?+) 1) ((eq char ?-) -1) ((eq char ?:) ?d) - ((string-match "[[:upper:]]" (setq str (string char))) ?A) - ((string-match "[[:lower:]]" str) ?a) + ((string-match "[[:lower:]]" (setq str (string char))) ?a) ((string-match "[[:digit:]]" str) ?0))))) (defun parse-time-tokenize (string) |