From: Lars Ingebrigtsen Date: Mon, 8 Nov 2021 05:03:41 +0000 (+0100) Subject: Fix yank-media--get-selection thinko in previous change X-Git-Tag: emacs-29.0.90~3671^2~81 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=19f37afe27907d189501f04cdb50fdfba0ef1761;p=emacs.git Fix yank-media--get-selection thinko in previous change * lisp/yank-media.el (yank-media--get-selection): Fix thinko after previous change. --- diff --git a/lisp/yank-media.el b/lisp/yank-media.el index bc57e96612c..070a81b8c70 100644 --- a/lisp/yank-media.el +++ b/lisp/yank-media.el @@ -80,12 +80,11 @@ all the different selection types." (yank-media--get-selection type))))) (gui-get-selection 'CLIPBOARD 'TARGETS))) -(defun yank-media--get-selection (type) - (let ((selection-coding-system 'binary)) - (when-let ((data (gui-get-selection 'CLIPBOARD type))) - (if (string-match-p "\\`text/" (symbol-name type)) - (yank-media-types--format type data) - data)))) +(defun yank-media--get-selection (data-type) + (when-let ((data (gui-get-selection 'CLIPBOARD data-type))) + (if (string-match-p "\\`text/" (symbol-name data-type)) + (yank-media-types--format data-type data) + data))) ;;;###autoload (defun yank-media-handler (types handler)