Browse Source

org-list: keep byte-compiler happy

Nicolas Goaziou 14 years ago
parent
commit
0bec47e9ab
1 changed files with 23 additions and 15 deletions
  1. 23 15
      lisp/org-list.el

+ 23 - 15
lisp/org-list.el

@@ -82,8 +82,10 @@
 (require 'org-compat)
 (require 'org-compat)
 
 
 (defvar org-blank-before-new-entry)
 (defvar org-blank-before-new-entry)
-(defvar org-M-RET-may-split-line)
 (defvar org-complex-heading-regexp)
 (defvar org-complex-heading-regexp)
+(defvar org-drawer-regexp)
+(defvar org-drawers)
+(defvar org-M-RET-may-split-line)
 (defvar org-odd-levels-only)
 (defvar org-odd-levels-only)
 (defvar org-outline-regexp)
 (defvar org-outline-regexp)
 (defvar org-ts-regexp)
 (defvar org-ts-regexp)
@@ -93,6 +95,8 @@
 (declare-function org-back-over-empty-lines "org" ())
 (declare-function org-back-over-empty-lines "org" ())
 (declare-function org-back-to-heading "org" (&optional invisible-ok))
 (declare-function org-back-to-heading "org" (&optional invisible-ok))
 (declare-function org-combine-plists "org" (&rest plists))
 (declare-function org-combine-plists "org" (&rest plists))
+(declare-function org-count "org" (cl-item cl-seq))
+(declare-function org-current-level "org" ())
 (declare-function org-entry-get "org"
 (declare-function org-entry-get "org"
 		  (pom property &optional inherit literal-nil))
 		  (pom property &optional inherit literal-nil))
 (declare-function org-get-indentation "org" (&optional line))
 (declare-function org-get-indentation "org" (&optional line))
@@ -103,10 +107,12 @@
 (declare-function org-inlinetask-goto-beginning "org-inlinetask" ())
 (declare-function org-inlinetask-goto-beginning "org-inlinetask" ())
 (declare-function org-inlinetask-goto-end "org-inlinetask" ())
 (declare-function org-inlinetask-goto-end "org-inlinetask" ())
 (declare-function org-inlinetask-in-task-p "org-inlinetask" ())
 (declare-function org-inlinetask-in-task-p "org-inlinetask" ())
+(declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
 (declare-function org-invisible-p "org" ())
 (declare-function org-invisible-p "org" ())
 (declare-function org-level-increment "org" ())
 (declare-function org-level-increment "org" ())
 (declare-function org-narrow-to-subtree "org" ())
 (declare-function org-narrow-to-subtree "org" ())
 (declare-function org-on-heading-p "org" (&optional invisible-ok))
 (declare-function org-on-heading-p "org" (&optional invisible-ok))
+(declare-function org-previous-line-empty-p "org" ())
 (declare-function org-remove-if "org" (predicate seq))
 (declare-function org-remove-if "org" (predicate seq))
 (declare-function org-show-subtree "org" ())
 (declare-function org-show-subtree "org" ())
 (declare-function org-time-string-to-seconds "org" (s))
 (declare-function org-time-string-to-seconds "org" (s))
@@ -978,7 +984,7 @@ PREVS is the alist of previous items. See
   "List all children of ITEM in STRUCT, or nil.
   "List all children of ITEM in STRUCT, or nil.
 PARENTS is the alist of items' parent. See
 PARENTS is the alist of items' parent. See
 `org-list-parents-alist'."
 `org-list-parents-alist'."
-  (let (all)
+  (let (all child)
     (while (setq child (car (rassq item parents)))
     (while (setq child (car (rassq item parents)))
       (setq parents (cdr (member (assq child parents) parents)))
       (setq parents (cdr (member (assq child parents) parents)))
       (push child all))
       (push child all))
@@ -1072,6 +1078,19 @@ Arguments REGEXP, BOUND and NOERROR are similar to those used in
 
 
 ;;; Methods on structures
 ;;; Methods on structures
 
 
+(defsubst org-list-bullet-string (bullet)
+  "Return BULLET with the correct number of whitespaces.
+It determines the number of whitespaces to append by looking at
+`org-list-two-spaces-after-bullet-regexp'."
+  (save-match-data
+    (let ((spaces (if (and org-list-two-spaces-after-bullet-regexp
+			   (string-match
+			    org-list-two-spaces-after-bullet-regexp bullet))
+		      "  "
+		    " ")))
+      (string-match "\\S-+\\([ \t]*\\)" bullet)
+      (replace-match spaces nil nil bullet 1))))
+
 (defun org-list-separating-blank-lines-number (pos struct prevs)
 (defun org-list-separating-blank-lines-number (pos struct prevs)
   "Return number of blank lines that should separate items in list.
   "Return number of blank lines that should separate items in list.
 POS is the position at item beginning to be considered. STRUCT is
 POS is the position at item beginning to be considered. STRUCT is
@@ -1722,19 +1741,6 @@ PARENTS is the alist of items' parents. See
 
 
 ;;; Misc Tools
 ;;; Misc Tools
 
 
-(defsubst org-list-bullet-string (bullet)
-  "Return BULLET with the correct number of whitespaces.
-It determines the number of whitespaces to append by looking at
-`org-list-two-spaces-after-bullet-regexp'."
-  (save-match-data
-    (let ((spaces (if (and org-list-two-spaces-after-bullet-regexp
-			   (string-match
-			    org-list-two-spaces-after-bullet-regexp bullet))
-		      "  "
-		    " ")))
-      (string-match "\\S-+\\([ \t]*\\)" bullet)
-      (replace-match spaces nil nil bullet 1))))
-
 (defun org-apply-on-list (function init-value &rest args)
 (defun org-apply-on-list (function init-value &rest args)
   "Call FUNCTION on each item of the list at point.
   "Call FUNCTION on each item of the list at point.
 FUNCTION must be called with at least one argument: INIT-VALUE,
 FUNCTION must be called with at least one argument: INIT-VALUE,
@@ -2592,6 +2598,7 @@ Point is left at list end."
 	 (top (org-list-get-top-point struct))
 	 (top (org-list-get-top-point struct))
 	 (bottom (org-list-get-bottom-point struct))
 	 (bottom (org-list-get-bottom-point struct))
 	 out
 	 out
+	 parse-item			; for byte-compiler
 	 (get-text
 	 (get-text
 	  (function
 	  (function
 	   ;; Return text between BEG and END, trimmed, with
 	   ;; Return text between BEG and END, trimmed, with
@@ -2796,6 +2803,7 @@ items."
 	 (csep (plist-get p :csep))
 	 (csep (plist-get p :csep))
 	 (cbon (plist-get p :cbon))
 	 (cbon (plist-get p :cbon))
 	 (cboff (plist-get p :cboff))
 	 (cboff (plist-get p :cboff))
+	 export-sublist			; for byte-compiler
 	 (export-item
 	 (export-item
 	  (function
 	  (function
 	   ;; Export an item ITEM of type TYPE, at DEPTH. First string
 	   ;; Export an item ITEM of type TYPE, at DEPTH. First string