[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/term/mac-win.el
From: |
Steven Tamm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/term/mac-win.el |
Date: |
Wed, 29 Dec 2004 21:20:20 -0500 |
Index: emacs/lisp/term/mac-win.el
diff -c emacs/lisp/term/mac-win.el:1.29 emacs/lisp/term/mac-win.el:1.30
*** emacs/lisp/term/mac-win.el:1.29 Wed Dec 29 17:25:02 2004
--- emacs/lisp/term/mac-win.el Thu Dec 30 02:04:31 2004
***************
*** 1567,1587 ****
"Edit the files listed in the drag-n-drop EVENT.
Switch to a buffer editing the last file dropped."
(interactive "e")
! (save-excursion
! ;; Make sure the drop target has positive co-ords
! ;; before setting the selected frame - otherwise it
! ;; won't work. <address@hidden>
! (let* ((window (posn-window (event-start event)))
! (coords (posn-x-y (event-start event)))
! (x (car coords))
! (y (cdr coords)))
! (if (and (> x 0) (> y 0))
! (set-frame-selected-window nil window))
! (mapcar (lambda (file-name)
! (x-dnd-handle-one-url window 'private
! (concat "file:" file-name)))
! (car (cdr (cdr event)))))
! (raise-frame)))
(global-set-key [drag-n-drop] 'mac-drag-n-drop)
--- 1567,1595 ----
"Edit the files listed in the drag-n-drop EVENT.
Switch to a buffer editing the last file dropped."
(interactive "e")
! ;; Make sure the drop target has positive co-ords
! ;; before setting the selected frame - otherwise it
! ;; won't work. <address@hidden>
! (let* ((window (posn-window (event-start event)))
! (coords (posn-x-y (event-start event)))
! (x (car coords))
! (y (cdr coords)))
! (if (and (> x 0) (> y 0))
! (set-frame-selected-window nil window))
! (mapcar (lambda (file-name)
! (if (listp file-name)
! (let ((line (car file-name))
! (start (car (cdr file-name)))
! (end (car (cdr (cdr file-name)))))
! (if (> line 0)
! (goto-line line)
! (if (and (> start 0) (> end 0))
! (progn (set-mark start)
! (goto-char end)))))
! (x-dnd-handle-one-url window 'private
! (concat "file:" file-name))))
! (car (cdr (cdr event)))))
! (raise-frame))
(global-set-key [drag-n-drop] 'mac-drag-n-drop)