summaryrefslogtreecommitdiff
path: root/helm-ring.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-21 06:59:45 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-21 06:59:45 +0100
commit39842b89504f134a0ea0d9c412d60e69d09cca15 (patch)
tree694f55914f40d9e9156d049b27c0997630e2fd19 /helm-ring.el
parent72fed81d61465ec1ac261c8325fe6e90ebc90434 (diff)
Don't bind yank fn to helm-current-buffer
* helm-ring.el (helm-kill-ring-action-yank): Do it.
Diffstat (limited to 'helm-ring.el')
-rw-r--r--helm-ring.el25
1 files changed, 12 insertions, 13 deletions
diff --git a/helm-ring.el b/helm-ring.el
index d3816ea0..6973c8b4 100644
--- a/helm-ring.el
+++ b/helm-ring.el
@@ -148,19 +148,18 @@ activating region.
If this action is executed just after `yank',
replace with STR as yanked string."
(let ((yank-fn (lambda (&optional before yank-pop)
- (with-helm-current-buffer
- (insert-for-yank str)
- ;; Set the window start back where it was in
- ;; the yank command, if possible.
- (when yank-pop
- (set-window-start (selected-window) yank-window-start t))
- (when (or helm-current-prefix-arg before)
- ;; Same as exchange-point-and-mark but without
- ;; activating region.
- (goto-char (prog1 (mark t)
- (set-marker (mark-marker)
- (point)
- helm-current-buffer))))))))
+ (insert-for-yank str)
+ ;; Set the window start back where it was in
+ ;; the yank command, if possible.
+ (when yank-pop
+ (set-window-start (selected-window) yank-window-start t))
+ (when (or helm-current-prefix-arg before)
+ ;; Same as exchange-point-and-mark but without
+ ;; activating region.
+ (goto-char (prog1 (mark t)
+ (set-marker (mark-marker)
+ (point)
+ helm-current-buffer)))))))
(with-helm-current-buffer
(unwind-protect
(progn