comparison lisp/x-dnd.el @ 65807:637dfc9b8d2e

* x-dnd.el (x-dnd-drop-data): Don't set dnd-open-file-other-window to nil if dropping on a window. Handle dropping on a minibuffer window like dropping on a non-window part of Emacs.
author Jan Djärv <jan.h.d@swipnet.se>
date Mon, 03 Oct 2005 19:41:49 +0000
parents 41bb365f41c4
children c502b2c18f47
comparison
equal deleted inserted replaced
65806:a9c074731be2 65807:637dfc9b8d2e
305 (handler (cdr type-info)) 305 (handler (cdr type-info))
306 (state (x-dnd-get-state-for-frame frame)) 306 (state (x-dnd-get-state-for-frame frame))
307 (action (aref state 5)) 307 (action (aref state 5))
308 (w (posn-window (event-start event)))) 308 (w (posn-window (event-start event))))
309 (when handler 309 (when handler
310 (if (and (windowp w) (window-live-p w)) 310 (if (and (windowp w) (window-live-p w)
311 (not (minibufferp (window-buffer w))))
311 ;; If dropping in a window, open files in that window rather 312 ;; If dropping in a window, open files in that window rather
312 ;; than in a new widow. 313 ;; than in a new widow.
313 (let ((dnd-open-file-other-window nil)) 314 (progn
314 (goto-char (posn-point (event-start event))) 315 (goto-char (posn-point (event-start event)))
315 (funcall handler window action data)) 316 (funcall handler window action data))
316 (let ((dnd-open-file-other-window t)) ;; Dropping on non-window. 317 (let ((dnd-open-file-other-window t)) ;; Dropping on non-window.
317 (select-frame frame) 318 (select-frame frame)
318 (funcall handler window action data)))))) 319 (funcall handler window action data))))))