diff --git a/lisp/ob-C.el b/lisp/ob-C.el index bbd05255f..793981a07 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -30,6 +30,8 @@ ;; - not much in the way of error feedback ;;; Code: +(eval-when-compile + (require 'cl)) (require 'ob) (require 'cc-mode) (eval-when-compile diff --git a/lisp/ob-core.el b/lisp/ob-core.el index bb77a7085..fbecd14c4 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -38,6 +38,7 @@ (defvar org-src-lang-modes) (defvar org-babel-library-of-babel) (declare-function show-all "outline" ()) +(declare-function org-every "org" (pred seq)) (declare-function org-remove-indentation "org" (code &optional n)) (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) (declare-function org-mark-ring-push "org" (&optional pos buffer)) @@ -1429,7 +1430,7 @@ specified in the properties of the current outline entry." (org-entry-get org-babel-current-src-block-location (concat "header-args:" lang) 'inherit)))))) -(defvar org-src-preserve-indentation) +(defvar org-src-preserve-indentation) ;; declare defcustom from org-src (defun org-babel-parse-src-block-match () "Parse the results from a match of the `org-babel-src-block-regexp'." (let* ((block-indentation (length (match-string 1))) diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index 220a3c36f..4412615d5 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -24,6 +24,7 @@ ;;; Code: (require 'ob-core) +(require 'org-src) (eval-when-compile (require 'cl)) diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index 22240addd..00066702a 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -147,7 +147,6 @@ specifying a variable of the same value." (concat "[" (mapconcat #'org-babel-haskell-var-to-haskell var ", ") "]") (format "%S" var))) -(defvar org-src-preserve-indentation) (defvar org-export-copy-to-kill-ring) (declare-function org-export-to-file "ox" (backend file diff --git a/lisp/ob-python.el b/lisp/ob-python.el index eb25609f8..5a6a3ae7d 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -56,8 +56,6 @@ This will typically be either 'python or 'python-mode." :package-version '(Org . "8.0") :type 'symbol) -(defvar org-src-preserve-indentation) - (defcustom org-babel-python-hline-to "None" "Replace hlines in incoming tables with this when translating to python." :group 'org-babel diff --git a/lisp/org-entities.el b/lisp/org-entities.el index 9bd043c6b..121b29c62 100644 --- a/lisp/org-entities.el +++ b/lisp/org-entities.el @@ -27,9 +27,8 @@ ;;; Code: -(require 'org-macs) - -(declare-function org-table-align "org-table" ()) +(declare-function org-toggle-pretty-entities "org" ()) +(declare-function org-table-align "org-table" ()) (eval-when-compile (require 'cl)) @@ -570,6 +569,7 @@ Kind can be any of `latex', `html', `ascii', `latin1', or `utf8'." (goto-char pos) (org-table-align))) +(defvar org-pretty-entities) ;; declare defcustom from org (defun org-entities-help () "Create a Help buffer with all available entities." (interactive) diff --git a/lisp/org.el b/lisp/org.el index e4a195625..24d9b99dd 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -111,17 +111,19 @@ Stars are put in group 1 and the trimmed body in group 2.") (unless (boundp 'diary-fancy-buffer) (org-defvaralias 'diary-fancy-buffer 'fancy-diary-buffer)) +(declare-function org-add-archive-files "org-archive" (files)) + (declare-function org-inlinetask-at-task-p "org-inlinetask" ()) (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-remove-overlays "org-clock" (&optional beg end noremove)) (declare-function org-clock-sum-current-item "org-clock" (&optional tstart)) +(declare-function org-clock-update-time-maybe "org-clock" ()) +(declare-function org-clocktable-shift "org-clock" (dir n)) (declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang)) (declare-function org-babel-do-in-edit-buffer "ob-core" (&rest body)) @@ -142,7 +144,9 @@ Stars are put in group 1 and the trimmed body in group 2.") (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-blank-field "org-table" ()) (declare-function org-table-end "org-table" (&optional table-type)) +(declare-function org-table-insert-row "org-table" (&optional arg)) (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" ()) @@ -175,6 +179,16 @@ Stars are put in group 1 and the trimmed body in group 2.") "Non-destructively remove duplicate elements from LIST." (let ((res (copy-sequence list))) (delete-dups res))) +(defsubst org-get-at-bol (property) + "Get text property PROPERTY at the beginning of line." + (get-text-property (point-at-bol) property)) + +(defsubst org-trim (s) + "Remove whitespace at the beginning and the end of string S." + (replace-regexp-in-string + "\\`[ \t\n\r]+" "" + (replace-regexp-in-string "[ \t\n\r]+\\'" "" s))) + ;; load languages based on value of `org-babel-load-languages' (defvar org-babel-load-languages) @@ -194,6 +208,7 @@ Stars are put in group 1 and the trimmed body in group 2.") (intern (concat "org-babel-expand-body:" lang))))))) org-babel-load-languages)) +(declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang)) ;;;###autoload (defun org-babel-load-file (file &optional compile) "Load Emacs Lisp source code blocks in the Org-mode FILE. @@ -21512,10 +21527,6 @@ With prefix arg UNCOMPILED, load the uncompiled versions." ;;; Generally useful functions -(defsubst org-get-at-bol (property) - "Get text property PROPERTY at the beginning of line." - (get-text-property (point-at-bol) property)) - (defsubst org-get-at-eol (property n) "Get text property PROPERTY at the end of line less N characters." (get-text-property (- (point-at-eol) n) property)) @@ -21720,12 +21731,6 @@ N may optionally be the number of spaces to remove." (or (buffer-base-buffer buffer) buffer))) -(defsubst org-trim (s) - "Remove whitespace at the beginning and the end of string S." - (replace-regexp-in-string - "\\`[ \t\n\r]+" "" - (replace-regexp-in-string "[ \t\n\r]+\\'" "" s))) - (defun org-wrap (string &optional width lines) "Wrap string to either a number of lines, or a width in characters. If WIDTH is non-nil, the string is wrapped to that width, however many lines @@ -22085,6 +22090,8 @@ for the search purpose." "Return the reverse of STRING." (apply 'string (reverse (string-to-list string)))) +;; defsubst org-uniquify must be defined before first use + (defun org-uniquify-alist (alist) "Merge elements of ALIST with the same key. diff --git a/lisp/ox.el b/lisp/ox.el index 1a54effaa..be843e6ee 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -89,12 +89,6 @@ (defvar org-table-number-fraction) (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 ;; @@ -1879,6 +1873,13 @@ an alist where associations are (VARIABLE-NAME VALUE)." ;; Return value in appropriate order of appearance. (nreverse (funcall collect-bind nil nil))))) +;; defsubst org-export-get-parent must be defined before first use, +;; was originally defined in the topology section + +(defsubst org-export-get-parent (blob) + "Return BLOB parent or nil. +BLOB is the element or object considered." + (org-element-property :parent blob)) ;;;; Tree Properties ;; @@ -5221,6 +5222,8 @@ 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 must be defined before first use + (defun org-export-get-genealogy (blob) "Return full genealogy relative to a given element or object.