瀏覽代碼

org-clock: Small fixes

* lisp/org-clock.el (org-clock-display-default-range): Improve
  docstring.  Add :safe keyword.
(org-clock-display): Fix comparison function.
Nicolas Goaziou 7 年之前
父節點
當前提交
9c675b0727
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      lisp/org-clock.el

+ 6 - 3
lisp/org-clock.el

@@ -430,7 +430,9 @@ This applies when using `org-clock-goto'."
   :type 'integer)
 
 (defcustom org-clock-display-default-range 'thisyear
-  "Default range when displaying clocks with `org-clock-display'."
+  "Default range when displaying clocks with `org-clock-display'.
+Valid values are: `today', `yesterday', `thisweek', `lastweek',
+`thismonth', `lastmonth', `thisyear', `lastyear' and `untilnow'."
   :group 'org-clock
   :type '(choice (const today)
 		 (const yesterday)
@@ -441,7 +443,8 @@ This applies when using `org-clock-goto'."
 		 (const thisyear)
 		 (const lastyear)
 		 (const untilnow)
-		 (const :tag "Select range interactively" interactive)))
+		 (const :tag "Select range interactively" interactive))
+  :safe #'symbolp)
 
 (defvar org-clock-in-prepare-hook nil
   "Hook run when preparing the clock.
@@ -1936,7 +1939,7 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times."
 	  (todayp (org-clock-sum-today))
 	  (customp (org-clock-sum-custom nil arg))
 	  (t (org-clock-sum)))
-    (unless (eq arg '(64))
+    (unless (equal arg '(64))
       (save-excursion
 	(goto-char (point-min))
 	(while (or (and (equal (setq p (point)) (point-min))