A region is wrapped in a pair using the keybindings specified in the definition iff all functions in :when keyword return non-nil, or if all functions in :unless keyword return nil.
Actual behavior
The :wrap keyword is ignorant of the :when and :unless keywords.
An example
With the below code, when pressing C-S-k in org-mode and having foo as active region,
\mathit{foo} should result if sp-in-math-p returns non-nil.
Expected behavior
A region is wrapped in a pair using the keybindings specified in the definition iff all functions in
:when
keyword returnnon-nil
, or if all functions in:unless
keyword returnnil
.Actual behavior
The
:wrap
keyword is ignorant of the:when
and:unless
keywords.An example
With the below code, when pressing
C-S-k
inorg-mode
and havingfoo
as active region,\mathit{foo}
should result ifsp-in-math-p
returnsnon-nil
./foo/
should result ifsp-in-math-p
returnsnil
.