From: Lars Ingebrigtsen Date: Fri, 26 Feb 2016 03:30:06 +0000 (+1030) Subject: Make parse-time-string-chars more efficient X-Git-Tag: emacs-26.0.90~2457 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4861b50e439443a1ba8a867c88faf28ae3737706;p=emacs.git 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). --- 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)