lang/org: optimize smartparens rule for headings

This commit is contained in:
Henrik Lissner 2019-08-07 17:03:16 -04:00
parent b808c4e1ab
commit 30d5eff10a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -768,8 +768,9 @@ compelling reason, so..."
(defun +org-sp-point-at-bol-p (_id action _context) (defun +org-sp-point-at-bol-p (_id action _context)
(and (eq action 'insert) (and (eq action 'insert)
(eq (char-before) ?*) (save-excursion
(sp--looking-back-p "^\\**" (line-beginning-position)))) (skip-chars-backward "*")
(bolp))))
;; make delimiter auto-closing a little more conservative ;; make delimiter auto-closing a little more conservative
(sp-with-modes 'org-mode (sp-with-modes 'org-mode