emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User option dnd-open-file-other-window has no effect


From: Richard M. Stallman
Subject: Re: User option dnd-open-file-other-window has no effect
Date: Tue, 04 Oct 2005 01:02:06 -0400

Does this code look good to you?

*** x-dnd.el    07 Aug 2005 13:30:28 -0400      1.16
--- x-dnd.el    03 Oct 2005 18:55:33 -0400      
***************
*** 307,319 ****
         (action (aref state 5))
         (w (posn-window (event-start event))))
      (when handler
!       (if (and (windowp w) (window-live-p w))
!         ;; If dropping in a window, open files in that window rather
!         ;; than in a new widow.
!         (let ((dnd-open-file-other-window nil))
            (goto-char (posn-point (event-start event)))
            (funcall handler window action data))
!       (let ((dnd-open-file-other-window t))  ;; Dropping on non-window.
          (select-frame frame)
          (funcall handler window action data))))))
  
--- 307,323 ----
         (action (aref state 5))
         (w (posn-window (event-start event))))
      (when handler
!       (if (and (windowp w) (window-live-p w)
!              (not (window-minibuffer-p w))
!              (not (window-dedicated-p w)))
!         ;; If dropping in an ordinary window which we could use,
!         ;; let dnd-open-file-other-window specify what to do.
!         (progn
            (goto-char (posn-point (event-start event)))
            (funcall handler window action data))
!       ;; If we can't display the file here,
!       ;; make a new window for it.
!       (let ((dnd-open-file-other-window t))
          (select-frame frame)
          (funcall handler window action data))))))
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]