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)

Documentation

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

The car is the command and the cdr is its arguments.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
(defun org-texinfo--match-definition (item)
  "Return a cons-cell if ITEM specifies a Texinfo definition command.
The car is the command and the cdr is its arguments."
  (let ((tag (car-safe (org-element-property :tag item))))
    (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))))))