Closed snan closed 7 months ago
This replaces #812 and #813 without introducing a new option
This is not correct because the region might not be defined when transient-mark-mode
is nil. Then region functions such as region-beginning
, region-end
throw an error.
I have read lots of elisp code but they use use-region-p
and don't care not transient-mark-mode
case. You gave vertico
as an example, but it doesn't use region functions around checking not transient-mark-mode
.
I suppose you should do one of the followings
use-region-p
as you likeCtrl-SPC Ctrl-SPC
(enable transient-mark-mode once) when you want to use some markdown command with the regiontransient-mark-mode
and disable its face attributesOr please fork this repository and improve it as you like, if you seriously need this feature,
This doesn't make sense for all commands like header insertion, so I only implemented it for some commands. Some of them said in the documentation that they check if transient-mark-mode was on which they didn't seem to do but they do with this commit. This is the way vertico and a couple of other packages use (use-region-p) in a more legacy-friendly way.