mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
Fix inserting selection data into Mozilla programs
* lisp/select.el (xselect-convert-to-text-uri-list): Don't return any value when converting non-DND selections to this drag-and-drop target. Reported by Tobias Bading <tbading@web.de>.
This commit is contained in:
parent
57562c3fd0
commit
8d5aa8df4a
1 changed files with 18 additions and 13 deletions
|
@ -807,7 +807,12 @@ This function returns the string \"emacs\"."
|
||||||
(defun xselect-convert-to-username (_selection _type _value)
|
(defun xselect-convert-to-username (_selection _type _value)
|
||||||
(user-real-login-name))
|
(user-real-login-name))
|
||||||
|
|
||||||
(defun xselect-convert-to-text-uri-list (_selection _type value)
|
(defun xselect-convert-to-text-uri-list (selection _type value)
|
||||||
|
;; While `xselect-uri-list-available-p' ensures that this target
|
||||||
|
;; will not be reported in the TARGETS of non-drag-and-drop
|
||||||
|
;; selections, Firefox stupidly converts to it anyway. Check that
|
||||||
|
;; the conversion request is being made for the correct selection.
|
||||||
|
(and (eq selection 'XdndSelection)
|
||||||
(let ((string
|
(let ((string
|
||||||
(if (stringp value)
|
(if (stringp value)
|
||||||
(xselect--encode-string 'TEXT
|
(xselect--encode-string 'TEXT
|
||||||
|
@ -819,7 +824,7 @@ This function returns the string \"emacs\"."
|
||||||
(insert (url-encode-url tem))
|
(insert (url-encode-url tem))
|
||||||
(insert "\n")))
|
(insert "\n")))
|
||||||
(xselect--encode-string 'TEXT (buffer-string)))))))
|
(xselect--encode-string 'TEXT (buffer-string)))))))
|
||||||
(cons 'text/uri-list (cdr string))))
|
(cons 'text/uri-list (cdr string)))))
|
||||||
|
|
||||||
(defun xselect-convert-to-xm-file (selection _type value)
|
(defun xselect-convert-to-xm-file (selection _type value)
|
||||||
(when (and (stringp value)
|
(when (and (stringp value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue