1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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’.
This commit is contained in:
Paul Eggert 2019-08-05 17:37:47 -07:00
parent aa624a092d
commit c6ba8100ea
2 changed files with 2 additions and 2 deletions

View 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.

View 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)