瀏覽代碼

org-clock.el (org-clock-jump-to-current-clock): Tiny enhancements

* lisp/org-clock.el (org-clock-jump-to-current-clock): Add a
docstring, do not use as a command and throw a user error
instead of an error when no clock is active.
Bastien 7 年之前
父節點
當前提交
1933d9ef26
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/org-clock.el

+ 2 - 2
lisp/org-clock.el

@@ -949,12 +949,12 @@ If necessary, clock-out of the currently active clock."
 					     resolve-to))))))))
 
 (defun org-clock-jump-to-current-clock (&optional effective-clock)
-  (interactive)
+  "When an Org clock is running, jump to it."
   (let ((drawer (org-clock-into-drawer))
 	(clock (or effective-clock (cons org-clock-marker
 					 org-clock-start-time))))
     (unless (marker-buffer (car clock))
-      (error "No clock is currently running"))
+      (user-error "No Org clock is currently running"))
     (org-with-clock clock (org-clock-goto))
     (with-current-buffer (marker-buffer (car clock))
       (goto-char (car clock))