From 4861b50e439443a1ba8a867c88faf28ae3737706 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 26 Feb 2016 14:00:06 +1030 Subject: [PATCH] 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). --- lisp/calendar/parse-time.el | 5 ++--- 1 file 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) -- 2.39.5