branch: master
commit 87710827e9d40ddcf8562387039ff6b53b8394e5
Author: BEN ENGLISCH <[email protected]>
Commit: Noam Postavsky <[email protected]>
Don't add useless kill ring entries
while describing snippet tables. This should also help users of
packages like pbcopy.el (which creates a new process on every
modification of the kill-ring, hence many `kill-region' calls at once
cause Emacs to run out of file descriptors).
* yasnippet.el (yas--create-snippet-xrefs): Use delete-region instead of
kill-region.
Copyright-paperwork-exempt: yes
Close #675.
---
yasnippet.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 187c8e7..a5a9690 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -4375,8 +4375,8 @@ object satisfying `yas--field-p' to restrict the
expansion to.")))
'yasnippet)))
(when template
(help-xref-button 1 'help-snippet-def template)
- (kill-region (match-end 1) (match-end 0))
- (kill-region (match-beginning 0) (match-beginning 1)))))))
+ (delete-region (match-end 1) (match-end 0))
+ (delete-region (match-beginning 0) (match-beginning 1)))))))
;;; Utils