]> code.delx.au - gnu-emacs-elpa/commitdiff
Don't add useless kill ring entries
authorBEN ENGLISCH <EMAILBEN145@gmail.com>
Sat, 9 Apr 2016 17:52:16 +0000 (12:52 -0500)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sun, 10 Apr 2016 15:33:31 +0000 (11:33 -0400)
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

index 187c8e7647da6c5efdb0640cd475140aec4c108b..a5a9690e6878ddc09c72751fbf8f3be58ef2b95b 100644 (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)))))))
 \f
 ;;; Utils