Browse Source

Require calendar already on top level in org.el

Carsten Dominik 15 years ago
parent
commit
bb0ef787b7
6 changed files with 17 additions and 13 deletions
  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>
 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)
 	* lisp/org-toc.el (org-toc-cycle-subtree, org-toc-show)
 	(org-toc-restore-config): Use the normal overlay API.
 	(org-toc-restore-config): Use the normal overlay API.
 
 

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

@@ -36,8 +36,7 @@
 
 
 (require 'org)
 (require 'org)
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
-  (require 'calendar))
+  (require 'cl))
 
 
 (defgroup org-learn nil
 (defgroup org-learn nil
   "Options concerning the learning code in Org-mode."
   "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>
 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.el (org-export-latex-fix-inputenc): Declare function.
 
 
 	* org-agenda.el (org-agenda-goto-calendar): Do not bind obsolete
 	* org-agenda.el (org-agenda-goto-calendar): Do not bind obsolete

+ 1 - 7
lisp/org-agenda.el

@@ -32,8 +32,7 @@
 
 
 (require 'org)
 (require 'org)
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
-  (require 'calendar))
+  (require 'cl))
 
 
 (declare-function diary-add-to-list "diary-lib"
 (declare-function diary-add-to-list "diary-lib"
                   (date string specifier &optional marker globcolor literal))
                   (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
 	    (move-marker org-agenda-restrict-end
 			 (progn (org-end-of-subtree t)))))))
 			 (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...)
       ;; For example the todo list should not need it (but does...)
       (cond
       (cond
        ((setq entry (assoc keys org-agenda-custom-commands))
        ((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
 If the buffer contains an active region, only check the region for
 dates."
 dates."
   (interactive "P")
   (interactive "P")
-  (require 'calendar)
   (org-compile-prefix-format 'timeline)
   (org-compile-prefix-format 'timeline)
   (org-set-sorting-strategy 'timeline)
   (org-set-sorting-strategy 'timeline)
   (let* ((dopast t)
   (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))
   (setq org-agenda-last-arguments (list include-all start-day ndays))
   (org-compile-prefix-format 'agenda)
   (org-compile-prefix-format 'agenda)
   (org-set-sorting-strategy 'agenda)
   (org-set-sorting-strategy 'agenda)
-  (require 'calendar)
   (let* ((org-agenda-start-on-weekday
   (let* ((org-agenda-start-on-weekday
 	  (if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays)))
 	  (if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays)))
 	      org-agenda-start-on-weekday nil))
 	      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
 for a keyword.  A numeric prefix directly selects the Nth keyword in
 `org-todo-keywords-1'."
 `org-todo-keywords-1'."
   (interactive "P")
   (interactive "P")
-  (require 'calendar)
   (org-compile-prefix-format 'todo)
   (org-compile-prefix-format 'todo)
   (org-set-sorting-strategy 'todo)
   (org-set-sorting-strategy 'todo)
   (org-prepare-agenda "TODO")
   (org-prepare-agenda "TODO")
@@ -7593,7 +7588,6 @@ either 'headline or 'category.  For example:
 will only add headlines containing IMPORTANT or headlines
 will only add headlines containing IMPORTANT or headlines
 belonging to the \"Work\" category."
 belonging to the \"Work\" category."
   (interactive "P")
   (interactive "P")
-  (require 'calendar)
   (if refresh (setq appt-time-msg-list nil))
   (if refresh (setq appt-time-msg-list nil))
   (if (eq filter t)
   (if (eq filter t)
       (setq filter (read-from-minibuffer "Regexp filter: ")))
       (setq filter (read-from-minibuffer "Regexp filter: ")))

+ 1 - 2
lisp/org-clock.el

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

+ 1 - 2
lisp/org-habit.el

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