From 7c668eb75b3e59819c9c3ddf00ed38cb89d3ca18 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 26 Oct 2023 19:49:40 +0800 Subject: [PATCH] Properly respond to drops observing the Motif protocol * lisp/pgtk-dnd.el (pgtk-dnd-handle-file-name): * lisp/x-dnd.el (x-dnd-handle-file-name): Correct order of arguments to d-h-m-u. --- lisp/pgtk-dnd.el | 21 +++++++++++---------- lisp/x-dnd.el | 22 ++++++++++++---------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/lisp/pgtk-dnd.el b/lisp/pgtk-dnd.el index 2ce1571aefc..48edaa2472a 100644 --- a/lisp/pgtk-dnd.el +++ b/lisp/pgtk-dnd.el @@ -253,16 +253,17 @@ STRING is the file names as a string, separated by nulls." retval) (let ((did-action (dnd-handle-multiple-urls - window action (mapcar - (lambda (item) - (when coding - (setq item (encode-coding-string item - coding))) - (concat "file://" - (mapconcat 'url-hexify-string - (split-string item "/") - "/"))) - uri-list)))) + window (mapcar + (lambda (item) + (when coding + (setq item (encode-coding-string item + coding))) + (concat "file://" + (mapconcat 'url-hexify-string + (split-string item "/") + "/"))) + uri-list) + action))) (when did-action (setq retval did-action))) retval)) diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index eca1e93ba07..cf7f61b39a7 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -384,16 +384,18 @@ STRING is the file names as a string, separated by nulls." retval) (let ((did-action (dnd-handle-multiple-urls - window action (mapcar - (lambda (item) - (when coding - (setq item (encode-coding-string item - coding))) - (concat "file://" - (mapconcat 'url-hexify-string - (split-string item "/") - "/"))) - uri-list)))) + window + (mapcar + (lambda (item) + (when coding + (setq item (encode-coding-string item + coding))) + (concat "file://" + (mapconcat 'url-hexify-string + (split-string item "/") + "/"))) + uri-list) + action))) (when did-action (setq retval did-action))) retval)) -- 2.39.2