case-fold-search)))
(string-match-p regexp string)))
-(defun el-search--print (expr)
- (let ((print-quoted t)
- (print-length nil)
+(defun el-search--pp-to-string (expr)
+ (let ((print-length nil)
(print-level nil))
- (prin1-to-string expr)))
+ (pp-to-string expr)))
(defvar el-search-read-expression-map
(let ((map (make-sparse-keymap)))
(use-local-map el-search-read-expression-map)
(setq font-lock-mode t)
(funcall font-lock-function 1)
- (backward-sexp)
- (indent-sexp)
+ (goto-char (minibuffer-prompt-end))
+ (when (looking-at ".*\n")
+ (indent-sexp))
(goto-char (point-max))
(when-let ((this-sexp (with-current-buffer (window-buffer (minibuffer-selected-window))
(thing-at-point 'sexp))))
(with-temp-buffer
(emacs-lisp-mode)
(insert (if splice
- (mapconcat #'el-search--print replacement " ")
- (el-search--print replacement)))
+ (mapconcat #'el-search--pp-to-string replacement " ")
+ (el-search--pp-to-string replacement)))
(goto-char 1)
(let (start this-sexp end orig-match-start orig-match-end done)
(while (and (< (point) (point-max))