mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-10 15:33:36 -05:00
refactor(lib): don't use smartparens' API
Toward our eventual goal of moving smartparens out of core, I've adapted this from code provided by hpfr on Discord, which was adapted from smartparen's syntax-ppss caching logic. `:config default` will need need some attention before we can fully move smartparens to its own `:editor smartparens` module. Co-authored-by: hpfr <hpfr@users.noreply.github.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
(if (eq char 27)
|
||||
(cons "" "")
|
||||
(let* ((pair (+evil--embrace-get-pair (string char)))
|
||||
(escape (if (sp-point-in-string) "\\\\" "\\"))
|
||||
(escape (if (doom-point-in-string-p) "\\\\" "\\"))
|
||||
(escape (format "\\1%s" (regexp-quote escape))))
|
||||
(cons (replace-regexp-in-string "^\\( *\\)" escape (car pair))
|
||||
(replace-regexp-in-string "^\\( *\\)" escape (cdr pair)))))))
|
||||
|
Reference in New Issue
Block a user