From: Paul Eggert Date: Tue, 6 Aug 2019 00:37:47 +0000 (-0700) Subject: Fix minor Org timestamp inefficiencies X-Git-Tag: emacs-27.0.90~1689 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c6ba8100ea1db4616d3fe8485430b29143bc3d2e;p=emacs.git Fix minor Org timestamp inefficiencies * lisp/org/org-id.el (org-id-time-to-b36): Remove unnecessary ‘or’. * lisp/org/org.el (org-parse-time-string): Remove unnecessary ‘encode-time’. --- diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index 8f9c132ad37..fe439a7b89d 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -421,7 +421,7 @@ using `org-id-decode'." (setq time (encode-time time 'list)) (concat (org-id-int-to-b36 (nth 0 time) 4) (org-id-int-to-b36 (nth 1 time) 4) - (org-id-int-to-b36 (or (nth 2 time) 0) 4))) + (org-id-int-to-b36 (nth 2 time) 4))) (defun org-id-decode (id) "Split ID into the prefix and the time value that was used to create it. diff --git a/lisp/org/org.el b/lisp/org/org.el index 5aa49b29d6f..cbf085a2691 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -17785,7 +17785,7 @@ NODEFAULT, hour and minute fields will be nil if not given." ;; second argument. However, this requires at least Emacs ;; 25.1. We can do it when we switch to this version as our ;; minimal requirement. - (decode-time (encode-time (org-matcher-time s)))) + (decode-time (org-matcher-time s))) (t (error "Not a standard Org time string: %s" s)))) (defun org-timestamp-up (&optional arg)