Function: org-element-subscript-parser
org-element-subscript-parser is a byte-compiled function defined in
org-element.el.gz.
Signature
(org-element-subscript-parser)
Documentation
Parse subscript at point, if any.
When at a subscript object, return a new syntax node of subscript
type containing :begin, :end, :contents-begin, :contents-end,
:use-brackets-p and :post-blank as properties. Otherwise, return
nil.
Assume point is at the underscore.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;;; Subscript
(defun org-element-subscript-parser ()
"Parse subscript at point, if any.
When at a subscript object, return a new syntax node of `subscript'
type containing `:begin', `:end', `:contents-begin', `:contents-end',
`:use-brackets-p' and `:post-blank' as properties. Otherwise, return
nil.
Assume point is at the underscore."
(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
'subscript
(list :begin begin
:end end
:use-brackets-p bracketsp
:contents-begin contents-begin
:contents-end contents-end
:post-blank post-blank)))))))