瀏覽代碼

Require calendar already on top level in org.el

Carsten Dominik 15 年之前
父節點
當前提交
bb0ef787b7
共有 6 個文件被更改,包括 17 次插入13 次删除
  1. 3 0
      contrib/ChangeLog
  2. 1 2
      contrib/lisp/org-learn.el
  3. 10 0
      lisp/ChangeLog
  4. 1 7
      lisp/org-agenda.el
  5. 1 2
      lisp/org-clock.el
  6. 1 2
      lisp/org-habit.el

+ 3 - 0
contrib/ChangeLog

@@ -1,5 +1,8 @@
 2010-04-18  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* lisp/org-learn.el (require): `calendar' is now required already
+	by org.el on top level.
+
 	* lisp/org-toc.el (org-toc-cycle-subtree, org-toc-show)
 	(org-toc-restore-config): Use the normal overlay API.
 

+ 1 - 2
contrib/lisp/org-learn.el

@@ -36,8 +36,7 @@
 
 (require 'org)
 (eval-when-compile
-  (require 'cl)
-  (require 'calendar))
+  (require 'cl))
 
 (defgroup org-learn nil
   "Options concerning the learning code in Org-mode."

+ 10 - 0
lisp/ChangeLog

@@ -1,5 +1,15 @@
 2010-04-18  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-habit.el (require): `calendar' is now required already by
+	org.el on top level.
+
+	* org-clock.el (require): `calendar' is now required already by
+	org.el on top level.
+
+	* org-agenda.el (require, org-timeline, org-agenda-list)
+	(org-todo-list, org-agenda-to-appt): `calendar' is now required
+	already by org.el on top level.
+
 	* org.el (org-export-latex-fix-inputenc): Declare function.
 
 	* org-agenda.el (org-agenda-goto-calendar): Do not bind obsolete

+ 1 - 7
lisp/org-agenda.el

@@ -32,8 +32,7 @@
 
 (require 'org)
 (eval-when-compile
-  (require 'cl)
-  (require 'calendar))
+  (require 'cl))
 
 (declare-function diary-add-to-list "diary-lib"
                   (date string specifier &optional marker globcolor literal))
@@ -1967,7 +1966,6 @@ Pressing `<' twice means to restrict to the current subtree or region
 	    (move-marker org-agenda-restrict-end
 			 (progn (org-end-of-subtree t)))))))
 
-      (require 'calendar)  ; FIXME: can we avoid this for some commands?
       ;; For example the todo list should not need it (but does...)
       (cond
        ((setq entry (assoc keys org-agenda-custom-commands))
@@ -2995,7 +2993,6 @@ under the current date.
 If the buffer contains an active region, only check the region for
 dates."
   (interactive "P")
-  (require 'calendar)
   (org-compile-prefix-format 'timeline)
   (org-set-sorting-strategy 'timeline)
   (let* ((dopast t)
@@ -3197,7 +3194,6 @@ given in `org-agenda-start-on-weekday'."
   (setq org-agenda-last-arguments (list include-all start-day ndays))
   (org-compile-prefix-format 'agenda)
   (org-set-sorting-strategy 'agenda)
-  (require 'calendar)
   (let* ((org-agenda-start-on-weekday
 	  (if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays)))
 	      org-agenda-start-on-weekday nil))
@@ -3624,7 +3620,6 @@ the list to these.  When using \\[universal-argument], you will be prompted
 for a keyword.  A numeric prefix directly selects the Nth keyword in
 `org-todo-keywords-1'."
   (interactive "P")
-  (require 'calendar)
   (org-compile-prefix-format 'todo)
   (org-set-sorting-strategy 'todo)
   (org-prepare-agenda "TODO")
@@ -7593,7 +7588,6 @@ either 'headline or 'category.  For example:
 will only add headlines containing IMPORTANT or headlines
 belonging to the \"Work\" category."
   (interactive "P")
-  (require 'calendar)
   (if refresh (setq appt-time-msg-list nil))
   (if (eq filter t)
       (setq filter (read-from-minibuffer "Regexp filter: ")))

+ 1 - 2
lisp/org-clock.el

@@ -30,8 +30,7 @@
 
 (require 'org)
 (eval-when-compile
-  (require 'cl)
-  (require 'calendar))
+  (require 'cl))
 
 (declare-function calendar-absolute-from-iso    "cal-iso"    (&optional date))
 (defvar org-time-stamp-formats)

+ 1 - 2
lisp/org-habit.el

@@ -30,8 +30,7 @@
 (require 'org)
 (require 'org-agenda)
 (eval-when-compile
-  (require 'cl)
-  (require 'calendar))
+  (require 'cl))
 
 (defgroup org-habit nil
   "Options concerning habit tracking in Org-mode."