feat(emacs): Fill some search-related stubs
This commit is contained in:
@@ -120,4 +120,16 @@ in some cases."
|
||||
(interactive "P<x><y>")
|
||||
(syd-evil-paste t arg register yank-handler))
|
||||
|
||||
;;;###autoload
|
||||
(defun syd-pcre-quote (str)
|
||||
"Like `reqexp-quote', but for PCREs."
|
||||
(let ((special '(?. ?^ ?$ ?* ?+ ?? ?{ ?\\ ?\[ ?\| ?\())
|
||||
(quoted nil))
|
||||
(mapc (lambda (c)
|
||||
(when (memq c special)
|
||||
(push ?\\ quoted))
|
||||
(push c quoted))
|
||||
str)
|
||||
(concat (nreverse quoted))))
|
||||
|
||||
(provide 'syd-text)
|
||||
|
||||
Reference in New Issue
Block a user