Skip to content

Commit

Permalink
docs: clarify the docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuco1 committed Jun 29, 2024
1 parent cf57048 commit a865339
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions smartparens.el
Original file line number Diff line number Diff line change
Expand Up @@ -1536,8 +1536,11 @@ kill \"subwords\" when `subword-mode' is active."
:group 'smartparens)

(defcustom sp-delete-blank-sexps nil
"If non-nil, allow deletion of enclosing pair when it only
contains whitespace."
"If non-nil, automatically delete enclosing pair when it only
contains whitespace.

This setting only has effect if `smartparens-strict-mode' is
active."
:type 'boolean
:group 'smartparens)

Expand Down Expand Up @@ -1835,18 +1838,19 @@ If optional argument P is present test this instead of point."

If optional argument P is present test this instead of point.

Returns a cons containing the position of the beginning and end
delimiters.
If the sexp around the point is blank, the return value is a cons
containing the beginning and end of the expression.

Warning: it is only safe to call this when point is inside a
sexp, otherwise the call may be very slow."
(save-excursion
(when p (goto-char p))
(-when-let (enc (sp-get-enclosing-sexp))
(sp-get enc (when (string-match-p
"\\`[ \t\n]*\\'"
(buffer-substring-no-properties :beg-in :end-in))
(cons :beg :end))))))
(sp-get enc
(when (string-match-p
"\\`[ \t\n]*\\'"
(buffer-substring-no-properties :beg-in :end-in))
(cons :beg :end))))))

(defun sp-char-is-escaped-p (&optional point)
"Test if the char at POINT is escaped or not.
Expand Down

0 comments on commit a865339

Please sign in to comment.