Browse Source

org-habit: Use cl-lib

* lisp/org-habit.el (org-habit-build-graph): Silence byte-compiler.
Nicolas Goaziou 8 years ago
parent
commit
9283e48336
1 changed files with 5 additions and 7 deletions
  1. 5 7
      lisp/org-habit.el

+ 5 - 7
lisp/org-habit.el

@@ -24,16 +24,14 @@
 ;;
 ;;; Commentary:
 
-;; This file contains the habit tracking code for Org-mode
+;; This file contains the habit tracking code for Org mode
 
 ;;; Code:
 
+(require 'cl-lib)
 (require 'org)
 (require 'org-agenda)
 
-(eval-when-compile
-  (require 'cl))
-
 (defgroup org-habit nil
   "Options concerning habit tracking in Org-mode."
   :tag "Org Habit"
@@ -368,9 +366,9 @@ current time."
 				  ;; number of S-REPEAT hops it takes
 				  ;; to get past DONE, with a minimum
 				  ;; of one hop.
-				  (incf s
-					(* (1+ (/ (max (- done s) 0) s-repeat))
-					   s-repeat))
+				  (cl-incf s (* (1+ (/ (max (- done s) 0)
+						       s-repeat))
+						s-repeat))
 				  (when (= done last-done-date)
 				    (throw :exit s))))))))))
 		 donep)))