Function: org-at-table-p

org-at-table-p is a byte-compiled function defined in org-table.el.gz.

Signature

(org-at-table-p &optional TABLE-TYPE)

Documentation

Non-nil if the cursor is inside an Org table.

If TABLE-TYPE is non-nil, also check for table.el-type tables.

Aliases

org-table-p (obsolete since 9.0)

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-table.el.gz
(defun org-at-table-p (&optional table-type)
  "Non-nil if the cursor is inside an Org table.
If TABLE-TYPE is non-nil, also check for table.el-type tables."
  (and (org-match-line (if table-type "[ \t]*[|+]" "[ \t]*|"))
       (or (not (derived-mode-p 'org-mode))
	   (let ((e (org-element-lineage (org-element-at-point) 'table t)))
	     (and e (or table-type
			(eq 'org (org-element-property :type e))))))))