lisp/org.el (org-in-src-block-p): Improve docstring

* lisp/org.el (org-in-src-block-p):

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87il5n9owq.fsf@gmail.com
This commit is contained in:
Ihor Radchenko 2023-11-27 20:54:42 +01:00
parent 4b1154e32d
commit bd7fab2129
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 7 additions and 3 deletions

View File

@ -18786,9 +18786,13 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
s)
(defun org-in-src-block-p (&optional inside element)
"Whether point is in a code source block.
When INSIDE is non-nil, don't consider we are within a source
block when point is at #+BEGIN_SRC or #+END_SRC.
"Return t when point is at a source block element.
When INSIDE is non-nil, return t only when point is between #+BEGIN_SRC
and #+END_SRC lines.
Note that affiliated keywords and blank lines after are considered a
part of a source block.
When ELEMENT is provided, it is considered to be element at point."
(save-match-data (setq element (or element (org-element-at-point))))
(when (org-element-type-p element 'src-block)