aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2019-08-05 17:37:47 -0700
committerPaul Eggert2019-08-05 17:38:15 -0700
commitc6ba8100ea1db4616d3fe8485430b29143bc3d2e (patch)
tree59c40aedd0960b883b6a123a63b125873c29a6b7
parentaa624a092db1e2c2e09345a08e3609095a9f9fc3 (diff)
downloademacs-c6ba8100ea1db4616d3fe8485430b29143bc3d2e.tar.gz
emacs-c6ba8100ea1db4616d3fe8485430b29143bc3d2e.zip
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’.
-rw-r--r--lisp/org/org-id.el2
-rw-r--r--lisp/org/org.el2
2 files changed, 2 insertions, 2 deletions
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'."
421 (setq time (encode-time time 'list)) 421 (setq time (encode-time time 'list))
422 (concat (org-id-int-to-b36 (nth 0 time) 4) 422 (concat (org-id-int-to-b36 (nth 0 time) 4)
423 (org-id-int-to-b36 (nth 1 time) 4) 423 (org-id-int-to-b36 (nth 1 time) 4)
424 (org-id-int-to-b36 (or (nth 2 time) 0) 4))) 424 (org-id-int-to-b36 (nth 2 time) 4)))
425 425
426(defun org-id-decode (id) 426(defun org-id-decode (id)
427 "Split ID into the prefix and the time value that was used to create it. 427 "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."
17785 ;; second argument. However, this requires at least Emacs 17785 ;; second argument. However, this requires at least Emacs
17786 ;; 25.1. We can do it when we switch to this version as our 17786 ;; 25.1. We can do it when we switch to this version as our
17787 ;; minimal requirement. 17787 ;; minimal requirement.
17788 (decode-time (encode-time (org-matcher-time s)))) 17788 (decode-time (org-matcher-time s)))
17789 (t (error "Not a standard Org time string: %s" s)))) 17789 (t (error "Not a standard Org time string: %s" s))))
17790 17790
17791(defun org-timestamp-up (&optional arg) 17791(defun org-timestamp-up (&optional arg)