aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSteven Tamm2004-12-30 02:04:31 +0000
committerSteven Tamm2004-12-30 02:04:31 +0000
commit456e761becb3d7dc0b7a707079b4f1259e9da598 (patch)
tree454fbf8751a183ab52de718af3abc65f0e739c96 /lisp
parentc4cb00d05e5e3a227681de41a4aef0067bce106a (diff)
downloademacs-456e761becb3d7dc0b7a707079b4f1259e9da598.tar.gz
emacs-456e761becb3d7dc0b7a707079b4f1259e9da598.zip
* macterm.c (SelectionRange): Add Xcode position apple event struct.
(do_ae_open_documents): Handle Xcode-style file position open events. * term/mac-win.el (mac-drag-n-drop): Handle drag-n-drop events that include line numbers.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/term/mac-win.el38
2 files changed, 28 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 25194e149ac..b8bdb1b1ea4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12004-12-29 Sanghyuk Suh <han9kin@mac.com>
2
3 * term/mac-win.el (mac-drag-n-drop): Handle drag-n-drop events
4 that include line numbers.
5
12004-12-29 Milan Zamazal <pdm@zamazal.org> 62004-12-29 Milan Zamazal <pdm@zamazal.org>
2 7
3 * files.el (hack-local-variables): If no PREFIX, set it to "^". 8 * files.el (hack-local-variables): If no PREFIX, set it to "^".
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 19d25288448..4b3c7531e5a 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1567,21 +1567,29 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
1567 "Edit the files listed in the drag-n-drop EVENT. 1567 "Edit the files listed in the drag-n-drop EVENT.
1568Switch to a buffer editing the last file dropped." 1568Switch to a buffer editing the last file dropped."
1569 (interactive "e") 1569 (interactive "e")
1570 (save-excursion 1570 ;; Make sure the drop target has positive co-ords
1571 ;; Make sure the drop target has positive co-ords 1571 ;; before setting the selected frame - otherwise it
1572 ;; before setting the selected frame - otherwise it 1572 ;; won't work. <skx@tardis.ed.ac.uk>
1573 ;; won't work. <skx@tardis.ed.ac.uk> 1573 (let* ((window (posn-window (event-start event)))
1574 (let* ((window (posn-window (event-start event))) 1574 (coords (posn-x-y (event-start event)))
1575 (coords (posn-x-y (event-start event))) 1575 (x (car coords))
1576 (x (car coords)) 1576 (y (cdr coords)))
1577 (y (cdr coords))) 1577 (if (and (> x 0) (> y 0))
1578 (if (and (> x 0) (> y 0)) 1578 (set-frame-selected-window nil window))
1579 (set-frame-selected-window nil window)) 1579 (mapcar (lambda (file-name)
1580 (mapcar (lambda (file-name) 1580 (if (listp file-name)
1581 (x-dnd-handle-one-url window 'private 1581 (let ((line (car file-name))
1582 (concat "file:" file-name))) 1582 (start (car (cdr file-name)))
1583 (car (cdr (cdr event))))) 1583 (end (car (cdr (cdr file-name)))))
1584 (raise-frame))) 1584 (if (> line 0)
1585 (goto-line line)
1586 (if (and (> start 0) (> end 0))
1587 (progn (set-mark start)
1588 (goto-char end)))))
1589 (x-dnd-handle-one-url window 'private
1590 (concat "file:" file-name))))
1591 (car (cdr (cdr event)))))
1592 (raise-frame))
1585 1593
1586(global-set-key [drag-n-drop] 'mac-drag-n-drop) 1594(global-set-key [drag-n-drop] 'mac-drag-n-drop)
1587 1595