summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-11-15 06:53:59 +0100
committerBastien Guerry <bzg@altern.org>2013-11-15 06:55:28 +0100
commitbf012136bd8a89cc297ebaecfc70e2e3eba7ac8e (patch)
tree3ace7f7ffde7c189fab88b439590ebc29331a813
parent22a061f575f9a58c2e0f7f72de3fa52679ddd61f (diff)
downloadorg-mode-bf012136bd8a89cc297ebaecfc70e2e3eba7ac8e.tar.gz
Remove org-autoload.
* org-macs.el (org-autoload): Delete. * org-docview.el ("docview"): Fix declarations and require doc-view directly. * org-id.el (org-id-copy) (org-id-get-with-outline-path-completion) (org-id-get-with-outline-drilling, org-id-new): * org-colview.el: (org-colview-initial-truncate-line-value) (org-columns-open-link, org-string-to-number): * org-clock.el: (org-clock-put-overlay, org-count-quarter, org-clock-loaded): * org-archive.el (org-get-local-archive-location): * org-agenda.el (org-agenda-todo-custom-ignore-p): Autoload. Those functions were autoloaded from within calls to `org-autoload' in org.el, we now autoload them from where they live.
-rw-r--r--contrib/lisp/org-colview-xemacs.el4
-rw-r--r--lisp/org-agenda.el1
-rw-r--r--lisp/org-archive.el1
-rw-r--r--lisp/org-clock.el3
-rw-r--r--lisp/org-colview.el5
-rw-r--r--lisp/org-docview.el8
-rw-r--r--lisp/org-id.el4
-rw-r--r--lisp/org-macs.el8
-rw-r--r--lisp/org-table.el3
-rw-r--r--lisp/org.el36
10 files changed, 26 insertions, 47 deletions
diff --git a/contrib/lisp/org-colview-xemacs.el b/contrib/lisp/org-colview-xemacs.el
index 63c0238..f9b35d3 100644
--- a/contrib/lisp/org-colview-xemacs.el
+++ b/contrib/lisp/org-colview-xemacs.el
@@ -477,6 +477,7 @@ This is the compiled version of the format.")
(defvar org-colview-initial-truncate-line-value nil
"Remember the value of `truncate-lines' across colview.")
+;;;###autoload
(defun org-columns-remove-overlays ()
"Remove all currently active column overlays."
(interactive)
@@ -820,6 +821,7 @@ around it."
(let ((value (get-char-property (point) 'org-columns-value)))
(org-open-link-from-string value arg)))
+;;;###autoload
(defun org-columns-get-format-and-top-level ()
(let (fmt)
(when (condition-case nil (org-back-to-heading) (error nil))
@@ -1091,6 +1093,7 @@ Don't set this, this is meant for dynamic scoping.")
(org-overlay-display ov (format fmt val))))))
org-columns-overlays))))
+;;;###autoload
(defun org-columns-compute (property)
"Sum the values of property PROPERTY hierarchically, for the entire buffer."
(interactive)
@@ -1187,6 +1190,7 @@ Don't set this, this is meant for dynamic scoping.")
(setq sum (+ (string-to-number (pop l)) (/ sum 60))))
sum)))
+;;;###autoload
(defun org-columns-number-to-string (n fmt &optional printf)
"Convert a computed column number to a string value, according to FMT."
(cond
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 42b0f0c..8bf122d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5451,6 +5451,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(>= days n)
(<= days n))))
+;;;###autoload
(defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
(&optional end)
"Do we have a reason to ignore this TODO entry because it has a time stamp?"
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index d5bdff1..3dc52c1 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -135,6 +135,7 @@ information."
(match-string 1))
(t org-archive-location))))))
+;;;###autoload
(defun org-add-archive-files (files)
"Splice the archive files into the list of files.
This implies visiting all these files and finding out what the
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 0b2037d..2340ffc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1871,6 +1871,7 @@ will be easy to remove."
(overlay-put ov 'end-glyph (make-glyph tx)))
(push ov org-clock-overlays)))
+;;;###autoload
(defun org-clock-remove-overlays (&optional beg end noremove)
"Remove the occur highlights from the buffer.
BEG and END are ignored. If NOREMOVE is nil, remove this function
@@ -2143,6 +2144,7 @@ If you can combine both, the month starting day will have priority."
((= n 3) "3rd")
((= n 4) "4th")))
+;;;###autoload
(defun org-clocktable-shift (dir n)
"Try to shift the :block date of the clocktable at point.
Point must be in the #+BEGIN: line of a clocktable, or this function
@@ -2752,6 +2754,7 @@ This function is made for clock tables."
(defvar org-clock-loaded nil
"Was the clock file loaded?")
+;;;###autoload
(defun org-clock-update-time-maybe ()
"If this is a CLOCK line, update it and return t.
Otherwise, return nil."
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 523b421..361560d 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -323,6 +323,7 @@ for the duration of the command.")
(defvar org-colview-initial-truncate-line-value nil
"Remember the value of `truncate-lines' across colview.")
+;;;###autoload
(defun org-columns-remove-overlays ()
"Remove all currently active column overlays."
(interactive)
@@ -670,6 +671,7 @@ around it."
(let ((value (get-char-property (point) 'org-columns-value)))
(org-open-link-from-string value arg)))
+;;;###autoload
(defun org-columns-get-format-and-top-level ()
(let ((fmt (org-columns-get-format)))
(org-columns-goto-top-level)
@@ -951,6 +953,8 @@ display, or in the #+COLUMNS line of the current buffer."
(defvar org-inlinetask-min-level
(if (featurep 'org-inlinetask) org-inlinetask-min-level 15))
+
+;;;###autoload
(defun org-columns-compute (property)
"Sum the values of property PROPERTY hierarchically, for the entire buffer."
(interactive)
@@ -1054,6 +1058,7 @@ display, or in the #+COLUMNS line of the current buffer."
(setq sum (+ (string-to-number (pop l)) (/ sum 60))))
sum)))
+;;;###autoload
(defun org-columns-number-to-string (n fmt &optional printf)
"Convert a computed column number to a string value, according to FMT."
(cond
diff --git a/lisp/org-docview.el b/lisp/org-docview.el
index 72ccc46..8e61c8a 100644
--- a/lisp/org-docview.el
+++ b/lisp/org-docview.el
@@ -44,12 +44,10 @@
(require 'org)
+(require 'doc-view)
-(declare-function doc-view-goto-page "ext:doc-view" (page))
-(declare-function image-mode-window-get "ext:image-mode"
- (prop &optional winprops))
-
-(org-autoload "doc-view" '(doc-view-goto-page))
+(declare-function doc-view-goto-page "doc-view" (page))
+(declare-function image-mode-window-get "image-mode" (prop &optional winprops))
(org-add-link-type "docview" 'org-docview-open 'org-docview-export)
(add-hook 'org-store-link-functions 'org-docview-store-link)
diff --git a/lisp/org-id.el b/lisp/org-id.el
index f1fa05b..37f6e70 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -233,6 +233,7 @@ With optional argument FORCE, force the creation of a new ID."
(org-entry-put (point) "ID" nil))
(org-id-get (point) 'create))
+;;;###autoload
(defun org-id-copy ()
"Copy the ID of the entry at point to the kill ring.
Create an ID if necessary."
@@ -258,6 +259,7 @@ In any case, the ID of the entry is returned."
(org-id-add-location id (buffer-file-name (buffer-base-buffer)))
id)))))
+;;;###autoload
(defun org-id-get-with-outline-path-completion (&optional targets)
"Use `outline-path-completion' to retrieve the ID of an entry.
TARGETS may be a setting for `org-refile-targets' to define
@@ -274,6 +276,7 @@ If necessary, the ID is created."
(prog1 (org-id-get pom 'create)
(move-marker pom nil))))
+;;;###autoload
(defun org-id-get-with-outline-drilling (&optional targets)
"Use an outline-cycling interface to retrieve the ID of an entry.
This only finds entries in the current buffer, using `org-get-location'.
@@ -320,6 +323,7 @@ With optional argument MARKERP, return the position as a new marker."
;; Creating new IDs
+;;;###autoload
(defun org-id-new (&optional prefix)
"Create a new globally unique ID.
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 0083d29..4afbace 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -283,14 +283,6 @@ we turn off invisibility temporarily. Use this in a `let' form."
(<= (match-beginning n) pos)
(>= (match-end n) pos)))
-(defun org-autoload (file functions)
- "Establish autoload for all FUNCTIONS in FILE, if not bound already."
- (let ((d (format "Documentation will be available after `%s.el' is loaded."
- file))
- f)
- (while (setq f (pop functions))
- (or (fboundp f) (autoload f file d t)))))
-
(defun org-match-line (re)
"Looking-at at the beginning of the current line."
(save-excursion
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 246cf8d..c191345 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -915,6 +915,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
(setq org-table-may-need-update nil)
))
+;;;###autoload
(defun org-table-begin (&optional table-type)
"Find the beginning of the table and return its position.
With argument TABLE-TYPE, go to the beginning of a table.el-type table."
@@ -928,6 +929,7 @@ With argument TABLE-TYPE, go to the beginning of a table.el-type table."
(beginning-of-line 2)
(point))))
+;;;###autoload
(defun org-table-end (&optional table-type)
"Find the end of the table and return its position.
With argument TABLE-TYPE, go to the end of a table.el-type table."
@@ -1199,6 +1201,7 @@ Return t when the line exists, nil if it does not exist."
(< (setq cnt (1+ cnt)) N)))
(= cnt N)))
+;;;###autoload
(defun org-table-blank-field ()
"Blank the current table field or active region."
(interactive)
diff --git a/lisp/org.el b/lisp/org.el
index e7fdd19..4c85b99 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4247,12 +4247,6 @@ Normal means, no org-mode-specific context."
"Detect the first line outside a table when searching from within it.
This works for both table types.")
-;; Autoload the functions in org-table.el that are needed by functions here.
-
-(eval-and-compile
- (org-autoload "org-table"
- '(org-table-begin org-table-blank-field org-table-end)))
-
(defconst org-TBLFM-regexp "^[ \t]*#\\+TBLFM: "
"Detect a #+TBLFM line.")
@@ -4333,12 +4327,6 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables."
(re-search-forward org-table-any-border-regexp nil 1))))
(unless quietly (message "Mapping tables: done")))
-;; Declare and autoload functions from org-agenda.el
-
-(eval-and-compile
- (org-autoload "org-agenda"
- '(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)))
-
(declare-function org-clock-save-markers-for-cut-and-paste "org-clock" (beg end))
(declare-function org-clock-update-mode-line "org-clock" ())
(declare-function org-resolve-clocks "org-clock"
@@ -4364,11 +4352,6 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables."
Return nil if no clock is running."
(marker-buffer org-clock-marker))
-(eval-and-compile
- (org-autoload "org-clock" '(org-clock-remove-overlays
- org-clock-update-time-maybe
- org-clocktable-shift)))
-
(defun org-check-running-clock ()
"Check if the current buffer contains the running clock.
If yes, offer to stop it and to save the buffer with the changes."
@@ -4568,33 +4551,18 @@ Otherwise, these types are allowed:
(defalias 'org-advertized-archive-subtree 'org-archive-subtree)
-(eval-and-compile
- (org-autoload "org-archive"
- '(org-add-archive-files)))
-
-;; Autoload Column View Code
+;; Declare Column View Code
(declare-function org-columns-number-to-string "org-colview" (n fmt &optional printf))
(declare-function org-columns-get-format-and-top-level "org-colview" ())
(declare-function org-columns-compute "org-colview" (property))
-(org-autoload (if (featurep 'xemacs) "org-colview-xemacs" "org-colview")
- '(org-columns-number-to-string
- org-columns-get-format-and-top-level
- org-columns-compute
- org-columns-remove-overlays))
-
-;; Autoload ID code
+;; Declare ID code
(declare-function org-id-store-link "org-id")
(declare-function org-id-locations-load "org-id")
(declare-function org-id-locations-save "org-id")
(defvar org-id-track-globally)
-(org-autoload "org-id"
- '(org-id-new
- org-id-copy
- org-id-get-with-outline-path-completion
- org-id-get-with-outline-drilling))
;;; Variables for pre-computed regular expressions, all buffer local