Function: org-element-superscript-parser
org-element-superscript-parser is a byte-compiled function defined in
org-element.el.gz.
Signature
(org-element-superscript-parser)
Documentation
Parse superscript at point, if any.
When at a superscript object, return a new syntax node of
superscript type containing :begin, :end, :contents-begin,
:contents-end, :use-brackets-p and :post-blank as properties.
Otherwise, return nil.
Assume point is at the caret.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;;; Superscript
(defun org-element-superscript-parser ()
"Parse superscript at point, if any.
When at a superscript object, return a new syntax node of
`superscript' type containing `:begin', `:end', `:contents-begin',
`:contents-end', `:use-brackets-p' and `:post-blank' as properties.
Otherwise, return nil.
Assume point is at the caret."
(save-excursion
(unless (bolp) (backward-char))
(when (looking-at org-match-substring-regexp)
(let ((bracketsp (if (match-beginning 4) t nil))
(begin (match-beginning 2))
(contents-begin (or (match-beginning 4)
(match-beginning 3)))
(contents-end (or (match-end 4) (match-end 3)))
(post-blank (progn (goto-char (match-end 0))
(skip-chars-forward " \t")))
(end (point)))
(org-element-create
'superscript
(list :begin begin
:end end
:use-brackets-p bracketsp
:contents-begin contents-begin
:contents-end contents-end
:post-blank post-blank))))))