Browse Source

ob-C, ob-clojure, ob-tangle, org-agenda, org, ox: fix byte-compiler warnings

* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
  `org-clock-update-time-maybe´, `org-clock-remove-overlays´,
  `org-babel-tangle-file´, `org-table-blank-field´,
  `org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
  `org-table-end´.  Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
  uses.
Achim Gratz 6 years ago
parent
commit
54a64f50b5
6 changed files with 23 additions and 11 deletions
  1. 2 0
      lisp/ob-C.el
  2. 2 0
      lisp/ob-clojure.el
  3. 0 2
      lisp/ob-tangle.el
  4. 1 0
      lisp/org-agenda.el
  5. 13 4
      lisp/org.el
  6. 5 5
      lisp/ox.el

+ 2 - 0
lisp/ob-C.el

@@ -32,6 +32,8 @@
 ;;; Code:
 (require 'ob)
 (require 'cc-mode)
+(eval-when-compile
+  (require 'cl))
 
 (declare-function org-entry-get "org"
 		  (pom property &optional inherit literal-nil))

+ 2 - 0
lisp/ob-clojure.el

@@ -45,6 +45,8 @@
 
 ;;; Code:
 (require 'ob)
+(eval-when-compile
+  (require 'cl))
 
 (declare-function cider-current-ns "ext:cider-interaction" ())
 (declare-function nrepl-send-string-sync "ext:nrepl-client" (input &optional ns session))

+ 0 - 2
lisp/ob-tangle.el

@@ -27,8 +27,6 @@
 
 ;;; Code:
 (require 'org-src)
-(eval-when-compile
-  (require 'cl))
 
 (declare-function org-edit-special "org" (&optional arg))
 (declare-function org-link-escape "org" (text &optional table))

+ 1 - 0
lisp/org-agenda.el

@@ -69,6 +69,7 @@
 (declare-function calendar-persian-date-string  "cal-persia" (&optional date))
 (declare-function calendar-check-holidays       "holidays" (date))
 
+(declare-function org-columns-remove-overlays "org-colview" ())
 (declare-function org-datetree-find-date-create "org-datetree"
 		  (date &optional keep-restriction))
 (declare-function org-columns-quit              "org-colview" ())

+ 13 - 4
lisp/org.el

@@ -115,24 +115,33 @@ Stars are put in group 1 and the trimmed body in group 2.")
 (declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
 (declare-function org-inlinetask-toggle-visibility "org-inlinetask" ())
 (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
+(declare-function org-clocktable-shift "org-clock" (dir n))
 (declare-function org-clock-get-last-clock-out-time "org-clock" ())
+(declare-function org-clock-update-time-maybe "org-clock" ())
+(declare-function org-clock-remove-overlays "org-clock" (&optional beg end noremove))
 (declare-function org-clock-timestamps-up "org-clock" (&optional n))
 (declare-function org-clock-timestamps-down "org-clock" (&optional n))
 (declare-function org-clock-sum-current-item "org-clock" (&optional tstart))
 
+(declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang))
 (declare-function orgtbl-mode "org-table" (&optional arg))
 (declare-function org-clock-out "org-clock" (&optional switch-to-state fail-quietly at-time))
 (declare-function org-beamer-mode "ox-beamer" ())
+(declare-function org-table-blank-field "org-table" ())
 (declare-function org-table-edit-field "org-table" (arg))
+(declare-function org-table-insert-row "org-table" (&optional arg))
 (declare-function org-table-justify-field-maybe "org-table" (&optional new))
 (declare-function org-table-set-constants "org-table" ())
 (declare-function org-table-calc-current-TBLFM "org-table" (&optional arg))
 (declare-function org-id-get-create "org-id" (&optional force))
+(declare-function org-add-archive-files "org-archive" (files))
 (declare-function org-id-find-id-file "org-id" (id))
 (declare-function org-tags-view "org-agenda" (&optional todo-only match))
 (declare-function org-agenda-list "org-agenda" (&optional arg start-day span))
 (declare-function org-agenda-redo "org-agenda" (&optional all))
 (declare-function org-table-align "org-table" ())
+(declare-function org-table-begin "org-table" (&optional table-type))
+(declare-function org-table-end "org-table" (&optional table-type))
 (declare-function org-table-paste-rectangle "org-table" ())
 (declare-function org-table-maybe-eval-formula "org-table" ())
 (declare-function org-table-maybe-recalculate-line "org-table" ())
@@ -161,6 +170,10 @@ Stars are put in group 1 and the trimmed body in group 2.")
 (declare-function org-element-restriction "org-element" (element))
 (declare-function org-element-type "org-element" (element))
 
+(defsubst org-uniquify (list)
+  "Non-destructively remove duplicate elements from LIST."
+  (let ((res (copy-sequence list))) (delete-dups res)))
+
 ;; load languages based on value of `org-babel-load-languages'
 (defvar org-babel-load-languages)
 
@@ -21782,10 +21795,6 @@ for the search purpose."
   "Return the reverse of STRING."
   (apply 'string (reverse (string-to-list string))))
 
-(defsubst org-uniquify (list)
-  "Non-destructively remove duplicate elements from LIST."
-  (let ((res (copy-sequence list))) (delete-dups res)))
-
 (defun org-uniquify-alist (alist)
   "Merge elements of ALIST with the same key.
 

+ 5 - 5
lisp/ox.el

@@ -90,6 +90,11 @@
 (defvar org-table-number-regexp)
 
 
+(defsubst org-export-get-parent (blob)
+  "Return BLOB parent or nil.
+BLOB is the element or object considered."
+  (org-element-property :parent blob))
+
 
 ;;; Internal Variables
 ;;
@@ -5156,11 +5161,6 @@ Return the new string."
 ;; `org-export-get-genealogy' returns the full genealogy of a given
 ;; element or object, from closest parent to full parse tree.
 
-(defsubst org-export-get-parent (blob)
-  "Return BLOB parent or nil.
-BLOB is the element or object considered."
-  (org-element-property :parent blob))
-
 (defun org-export-get-genealogy (blob)
   "Return full genealogy relative to a given element or object.