1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Fix yank-media--get-selection thinko in previous change

* lisp/yank-media.el (yank-media--get-selection): Fix thinko after
previous change.
This commit is contained in:
Lars Ingebrigtsen 2021-11-08 06:03:41 +01:00
parent 0022b02d16
commit 19f37afe27

View File

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