浏览代码

Get rid of some compiler warnings

Carsten Dominik 14 年之前
父节点
当前提交
af730fec0a
共有 2 个文件被更改,包括 17 次插入17 次删除
  1. 7 7
      lisp/org-agenda.el
  2. 10 10
      lisp/org-clock.el

+ 7 - 7
lisp/org-agenda.el

@@ -4959,7 +4959,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
 			(plist-get pl :gap-ok-around)))
 	 (def-face (or (plist-get pl :default-face)
 		       '((:background "DarkRed") (:foreground "white"))))
-	 issue)
+	 issue face m te ts dt ov)
     (goto-char (point-min))
     (while (re-search-forward " Clocked: +(-\\|\\([0-9]+:[0-9]+\\))" nil t)
       (setq issue nil face def-face)
@@ -5046,12 +5046,12 @@ See also the user option `org-agenda-clock-consistency-checks'."
 	;; Wrap it to after midnight.
 	(setq min2 (+ min2 1440)))
       ;; Now check if any of the OK times is in the gap
-      (mapcar (lambda (x)
-		;; Wrap the time to after midnight if necessary
-		(if (< x min1) (setq x (+ x 1440)))
-		;; Check if in interval
-		(and (<= min1 x) (>= min2 x) (throw 'exit t)))
-	      ok-list)
+      (mapc (lambda (x)
+	      ;; Wrap the time to after midnight if necessary
+	      (if (< x min1) (setq x (+ x 1440)))
+	      ;; Check if in interval
+	      (and (<= min1 x) (>= min2 x) (throw 'exit t)))
+	    ok-list)
       ;; Nope, this gap is not OK
       nil)))
 

+ 10 - 10
lisp/org-clock.el

@@ -976,6 +976,16 @@ so long."
 			 60.0))))
 	   org-clock-user-idle-start)))))
 
+(defvar org-clock-current-task nil
+  "Task currently clocked in.")
+(defun org-clock-set-current ()
+  "Set `org-clock-current-task' to the task currently clocked in."
+  (setq org-clock-current-task (nth 4 (org-heading-components))))
+
+(defun org-clock-delete-current ()
+  "Reset `org-clock-current-task' to nil."
+  (setq org-clock-current-task nil))
+
 (defun org-clock-in (&optional select start-time)
   "Start the clock on the current item.
 If necessary, clock-out of the currently active clock.
@@ -1157,16 +1167,6 @@ the clocking selection, associated with the letter `d'."
 	    (message "Clock starts at %s - %s" ts msg-extra)
 	    (run-hooks 'org-clock-in-hook)))))))
 
-(defvar org-clock-current-task nil
-  "Task currently clocked in.")
-(defun org-clock-set-current ()
-  "Set `org-clock-current-task' to the task currently clocked in."
-  (setq org-clock-current-task (nth 4 (org-heading-components))))
-
-(defun org-clock-delete-current ()
-  "Reset `org-clock-current-task' to nil."
-  (setq org-clock-current-task nil))
-
 (defun org-clock-mark-default-task ()
   "Mark current task as default task."
   (interactive)