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

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

[elpa] scratch/mheerdegen-preview 2d15aa7 22/33: WIP: [el-search] Fine t


From: Michael Heerdegen
Subject: [elpa] scratch/mheerdegen-preview 2d15aa7 22/33: WIP: [el-search] Fine tune separator for splicing replace
Date: Wed, 24 Oct 2018 18:30:52 -0400 (EDT)

branch: scratch/mheerdegen-preview
commit 2d15aa7d1614a7b79542084dcf9762ccdbdeffe4
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 3bea82f..cb9bcd4 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -3955,7 +3955,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]