]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix minor Org timestamp inefficiencies
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Aug 2019 00:37:47 +0000 (17:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Aug 2019 00:38:15 +0000 (17:38 -0700)
* 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’.

lisp/org/org-id.el
lisp/org/org.el

index 8f9c132ad3758577e7024b5741a157a584a3b81b..fe439a7b89da640772752abf22fc9a7be0819957 100644 (file)
@@ -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.
index 5aa49b29d6ffc0d1ab96c53dae3f1a0cced9f654..cbf085a26910b6723acd4998018a3c8e2e00521a 100644 (file)
@@ -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)