jrblevin / markdown-mode

Emacs Markdown Mode
http://jblevins.org/projects/markdown-mode/
GNU General Public License v3.0
875 stars 160 forks source link

Introduce ignore region customize variable #813

Closed syohex closed 7 months ago

syohex commented 7 months ago

Description

The variable name is same as org-mode's one

Related Issue

812 (CC: @snan )

Type of Change

Checklist

snan commented 7 months ago

Hi, thanks for taking a look at my PR! ♥ I've found a problem with mine (C-c C-s ! with the cursor on the line of a header no longer works) but there's a huger problem with your variant here:

(defsubst markdown--region-active-p ()
   (and (not markdown-ignore-region) (use-region-p)))

That's the opposite of what I need. I don't want to ignore the region, I want to use the region even when it's not active! Normal, old school regions! That's why I had or instead of and, because I want it to work even when (use-region-p) is nil due to the region not being active.