summaryrefslogtreecommitdiff
path: root/helm-ring.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-22 07:01:07 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-22 07:01:07 +0100
commit23672c00f4d1ffad0b953d522682052b3fdb34de (patch)
tree755d39541b61b757271801ca1891462a82e8db6f /helm-ring.el
parentf1878e94353e1f1595db91e7c6b88c0a910b9835 (diff)
Add new var helm-kill-ring-separator (#1934)
* helm-ring.el (helm-kill-ring-separator): New. (helm-kill-ring-action-yank): Use it.
Diffstat (limited to 'helm-ring.el')
-rw-r--r--helm-ring.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/helm-ring.el b/helm-ring.el
index c9fac52e..bb8a9c10 100644
--- a/helm-ring.el
+++ b/helm-ring.el
@@ -46,11 +46,6 @@ will not have anymore separators between candidates."
(integer :tag "Max candidate offset"))
:group 'helm-ring)
-(defcustom helm-register-max-offset 160
- "Max size of string register entries before truncating."
- :group 'helm-ring
- :type 'integer)
-
(defcustom helm-kill-ring-actions
'(("Yank marked" . helm-kill-ring-action-yank)
("Delete marked" . helm-kill-ring-action-delete))
@@ -58,6 +53,15 @@ will not have anymore separators between candidates."
:group 'helm-ring
:type '(alist :key-type string :value-type function))
+(defcustom helm-kill-ring-separator "\n"
+ "The separator used to separate marked candidates when yanking."
+ :group 'helm-ring
+ :type 'string)
+
+(defcustom helm-register-max-offset 160
+ "Max size of string register entries before truncating."
+ :group 'helm-ring
+ :type 'integer)
;;; Kill ring
;;
@@ -142,11 +146,11 @@ Same as `helm-kill-selection-and-quit' called with a prefix arg."
"Insert concatenated marked candidates in current-buffer.
When two prefix args are given prompt to choose separator, otherwise
-a new line as default separator is used."
+use `helm-kill-ring-separator' as default."
(let ((marked (helm-marked-candidates))
(sep (if (equal helm-current-prefix-arg '(16))
(read-string "Separator: ")
- "\n")))
+ helm-kill-ring-separator)))
(helm-kill-ring-action-yank-1
(cl-loop for c in (butlast marked)
concat (concat c sep) into str