Implement `org-decode-time' for backward compatibility
* lisp/org-compat.el (org-decode-time): New function. * lisp/org-clock.el (org-clock-get-sum-start): Use new function. Emacs 24's `decode-time' doesn't accept two arguments.
This commit is contained in:
parent
10b1cfb031
commit
3359e05e82
|
@ -1440,7 +1440,7 @@ The time is always returned as UTC."
|
||||||
(current-time))
|
(current-time))
|
||||||
((equal cmt "today")
|
((equal cmt "today")
|
||||||
(setq org--msg-extra "showing today's task time.")
|
(setq org--msg-extra "showing today's task time.")
|
||||||
(let* ((dt (decode-time nil t))
|
(let* ((dt (org-decode-time nil t))
|
||||||
(hour (nth 2 dt))
|
(hour (nth 2 dt))
|
||||||
(day (nth 3 dt)))
|
(day (nth 3 dt)))
|
||||||
(if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day)))
|
(if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day)))
|
||||||
|
|
|
@ -61,6 +61,12 @@
|
||||||
(defalias 'format-message 'format)
|
(defalias 'format-message 'format)
|
||||||
(defalias 'gui-get-selection 'x-get-selection))
|
(defalias 'gui-get-selection 'x-get-selection))
|
||||||
|
|
||||||
|
(defun org-decode-time (&optional time zone)
|
||||||
|
"Backward-compatible function for `decode-time'."
|
||||||
|
(if (< emacs-major-version 25)
|
||||||
|
(decode-time time)
|
||||||
|
(decode-time time zone)))
|
||||||
|
|
||||||
(unless (fboundp 'directory-name-p)
|
(unless (fboundp 'directory-name-p)
|
||||||
(defun directory-name-p (name)
|
(defun directory-name-p (name)
|
||||||
"Return non-nil if NAME ends with a directory separator character."
|
"Return non-nil if NAME ends with a directory separator character."
|
||||||
|
|
Loading…
Reference in New Issue