1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-24 07:20:29 +00:00

org-timer.el: Remove useless `or' conditional

* lisp/org-timer.el (org-timer--get-timer-title): Remove
useless `or' conditional.
This commit is contained in:
Bastien 2020-03-02 15:55:45 +01:00
parent abf5ab0944
commit a753bad1bf

View File

@ -468,22 +468,21 @@ time is up."
(defun org-timer--get-timer-title ()
"Construct timer title.
Try to use an Org header, otherwise use the buffer name."
(or
(cond
((derived-mode-p 'org-agenda-mode)
(let* ((marker (or (get-text-property (point) 'org-marker)))
(hdmarker (or (get-text-property (point) 'org-hd-marker)
marker)))
(when (and marker (marker-buffer marker))
(with-current-buffer (marker-buffer marker)
(org-with-wide-buffer
(goto-char hdmarker)
(org-show-entry)
(or (ignore-errors (org-get-heading))
(buffer-name (buffer-base-buffer))))))))
((derived-mode-p 'org-mode)
(ignore-errors (org-get-heading))))
(buffer-name (buffer-base-buffer))))
(cond
((derived-mode-p 'org-agenda-mode)
(let* ((marker (or (get-text-property (point) 'org-marker)))
(hdmarker (or (get-text-property (point) 'org-hd-marker)
marker)))
(when (and marker (marker-buffer marker))
(with-current-buffer (marker-buffer marker)
(org-with-wide-buffer
(goto-char hdmarker)
(org-show-entry)
(or (ignore-errors (org-get-heading))
(buffer-name (buffer-base-buffer))))))))
((derived-mode-p 'org-mode)
(ignore-errors (org-get-heading)))
(t (buffer-name (buffer-base-buffer)))))
(provide 'org-timer)