emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/mheerdegen-preview feede7d 23/35: WIP: [el-search] Fine t


From: Michael Heerdegen
Subject: [elpa] scratch/mheerdegen-preview feede7d 23/35: WIP: [el-search] Fine tune separator for splicing replace
Date: Mon, 29 Oct 2018 22:24:07 -0400 (EDT)

branch: scratch/mheerdegen-preview
commit feede7d8c8f2d77beb35806ffbfdcb64eb589628
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    WIP: [el-search] Fine tune separator for splicing replace
---
 packages/el-search/el-search.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index b0af521..1ecfa8f 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -3959,7 +3959,11 @@ The return value is a marker pointing to the end of the 
replacement."
           (with-temp-buffer
             (emacs-lisp-mode)
             (insert (if splice
-                        (mapconcat #'el-search--pp-to-string replacement " ")
+                        (let ((insertions (mapcar #'el-search--pp-to-string 
replacement)))
+                          (mapconcat #'identity insertions
+                                     (if (cl-some (apply-partially 
#'string-match-p "\n")
+                                                  insertions)
+                                         "\n" " ")))
                       (el-search--pp-to-string replacement)))
             (goto-char 1)
             (let (start this-sexp end orig-match-start orig-match-end done)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]