Function: org-texinfo--match-definition

org-texinfo--match-definition is a byte-compiled function defined in ox-texinfo.el.gz.

Signature

(org-texinfo--match-definition ITEM &optional INFO)

Documentation

Return a cons-cell if ITEM specifies a Texinfo definition command.

The car is the command and the cdr is its arguments. INFO is the export INFO plist.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
(defun org-texinfo--match-definition (item &optional info)
  "Return a cons-cell if ITEM specifies a Texinfo definition command.
The car is the command and the cdr is its arguments.
INFO is the export INFO plist."
  (let ((tag (org-export-data (org-element-property :tag item) info)))
    (and tag
	 (stringp tag)
	 (string-match org-texinfo--definition-command-regexp tag)
	 (pcase-let*
	     ((cmd (car (rassoc (match-string-no-properties 1 tag)
				org-texinfo--definition-command-alist)))
	      (`(,cmd ,category)
	       (and cmd (save-match-data (split-string cmd " "))))
	      (args (match-string-no-properties 2 tag)))
	   (cons cmd (if category (concat category " " args) args))))))