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.
This commit is contained in:
BEN ENGLISCH 2016-04-09 12:52:16 -05:00 committed by Noam Postavsky
parent 3e67b1bb7b
commit 87710827e9

View File

@ -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