Function: org-cite--move-punct-before

org-cite--move-punct-before is a byte-compiled function defined in oc.el.gz.

Signature

(org-cite--move-punct-before PUNCT CITATION S INFO)

Documentation

Move punctuation PUNCT before CITATION object.

String S contains PUNCT. INFO is the export state, as a property list. The function assumes S follows CITATION. Parse tree is modified by side-effect.

Source Code

;; Defined in /usr/src/emacs/lisp/org/oc.el.gz
(defun org-cite--move-punct-before (punct citation s info)
  "Move punctuation PUNCT before CITATION object.
String S contains PUNCT.  INFO is the export state, as a property list.
The function assumes S follows CITATION.  Parse tree is modified by side-effect."
  (if (equal s punct)
      (org-element-extract-element s)   ;it would be empty anyway
    (org-element-set-element s (substring s (length punct))))
  ;; Remove blanks before citation.
  (org-cite--set-previous-post-blank citation 0 info)
  (org-element-insert-before
   ;; Blanks between citation and punct are now before punct and
   ;; citation.
   (concat (make-string (or (org-element-property :post-blank citation) 0) ?\s)
           punct)
   citation))