org, ox: move defsubst before first use

* lisp/ox.el (org-export-get-parent): Move definition of
  'org-export-get-parent' before first use.  Leave comment at original
  place of definition.

* lisp/org.el (org-uniquify): Move definition of 'org-uniquify' before
  first use.  Leave comment at original place of definition.
This commit is contained in:
Achim Gratz 2014-05-28 13:18:05 +02:00
parent cbce904187
commit 6c1b41bd68
2 changed files with 13 additions and 8 deletions

View File

@ -10602,6 +10602,10 @@ application the system uses for this file type."
(move-marker org-open-link-marker nil)
(run-hook-with-args 'org-follow-link-hook)))
(defsubst org-uniquify (list)
"Non-destructively remove duplicate elements from LIST."
(let ((res (copy-sequence list))) (delete-dups res)))
(defun org-offer-links-in-entry (buffer marker &optional nth zero)
"Offer links in the current entry and return the selected link.
If there is only one link, return it.
@ -21832,9 +21836,7 @@ 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)))
;; defsubst org-uniquify must be defined before first use
(defun org-uniquify-alist (alist)
"Merge elements of ALIST with the same key.

View File

@ -1843,6 +1843,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
;;
@ -5105,11 +5112,7 @@ 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))
;; 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.