From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sanghyuk Suh Newsgroups: gmane.emacs.devel Subject: Integration with Apple Xcode Date: Wed, 24 Nov 2004 18:20:37 -0800 Message-ID: <16121944.1101349237500.JavaMail.han9kin@mac.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_132_10345675.1101349237495" X-Trace: sea.gmane.org 1101349267 9069 80.91.229.6 (25 Nov 2004 02:21:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Nov 2004 02:21:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 25 03:20:54 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CX9Fe-00037g-00 for ; Thu, 25 Nov 2004 03:20:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CX9Op-0004R0-7u for ged-emacs-devel@m.gmane.org; Wed, 24 Nov 2004 21:30:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CX9Oh-0004Qv-Vg for emacs-devel@gnu.org; Wed, 24 Nov 2004 21:30:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CX9Oh-0004Qj-KF for emacs-devel@gnu.org; Wed, 24 Nov 2004 21:30:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CX9Oh-0004Qg-Hk for emacs-devel@gnu.org; Wed, 24 Nov 2004 21:30:15 -0500 Original-Received: from [17.250.248.47] (helo=smtpout.mac.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CX9FO-0000WS-E1 for emacs-devel@gnu.org; Wed, 24 Nov 2004 21:20:38 -0500 Original-Received: from mac.com (webmail37-en1 [10.13.8.117]) by smtpout.mac.com (8.12.6/MantshX 2.0) with ESMTP id iAP2KcX3026204 for ; Wed, 24 Nov 2004 18:20:38 -0800 (PST) Original-Received: from webmail37 (localhost.mac.com [127.0.0.1]) by mac.com (Xserve/webmail37/MantshX 4.0) with ESMTP id iAP2KbjG011994 for ; Wed, 24 Nov 2004 18:20:37 -0800 (PST) Original-To: emacs-devel@gnu.org X-Originating-IP: 203.227.97.23/instID=185 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:30331 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30331 ------=_Part_132_10345675.1101349237495 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sorry, I forgot attaching the diff Sanghyuk Suh ------=_Part_132_10345675.1101349237495 Content-Type: application/octet-stream; name=emacs-xcode.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=emacs-xcode.diff Index: lisp/term/mac-win.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v retrieving revision 1.25 diff -c -r1.25 mac-win.el *** lisp/term/mac-win.el 2 Sep 2004 16:59:18 -0000 1.25 --- lisp/term/mac-win.el 23 Nov 2004 15:34:02 -0000 *************** *** 148,154 **** "Edit the files listed in the drag-n-drop event.\n\ 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. --- 148,154 ---- "Edit the files listed in the drag-n-drop event.\n\ 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. *************** *** 160,173 **** (set-frame-selected-window nil window)) (mapcar '(lambda (file) ! (find-file ! (decode-coding-string ! file ! (or file-name-coding-system ! default-file-name-coding-system)))) (car (cdr (cdr event))))) (raise-frame) ! (recenter))) (global-set-key [drag-n-drop] 'mac-drag-n-drop) --- 160,182 ---- (set-frame-selected-window nil window)) (mapcar '(lambda (file) ! (if (listp file) ! (let ((line (car file)) ! (start (car (cdr file))) ! (end (car (cdr (cdr file))))) ! (if (> line 0) ! (goto-line line) ! (if (and (> start 0) (> end 0)) ! (progn (set-mark start) ! (goto-char end))))) ! (find-file ! (decode-coding-string ! file ! (or file-name-coding-system ! default-file-name-coding-system))))) (car (cdr (cdr event))))) (raise-frame) ! (recenter));) (global-set-key [drag-n-drop] 'mac-drag-n-drop) Index: src/macterm.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/macterm.c,v retrieving revision 1.82 diff -c -r1.82 macterm.c *** src/macterm.c 21 Nov 2004 15:49:12 -0000 1.82 --- src/macterm.c 23 Nov 2004 15:34:03 -0000 *************** *** 7760,7765 **** --- 7760,7776 ---- /* Called when we receive an AppleEvent with an ID of "kAEOpenDocuments". This routine gets the direct parameter, extracts the FSSpecs in it, and puts their names on a list. */ + #pragma options align=mac68k + typedef struct SelectionRange { + short unused1; // 0 (not used) + short lineNum; // line to select (<0 to specify range) + long startRange; // start of selection range (if line < 0) + long endRange; // end of selection range (if line < 0) + long unused2; // 0 (not used) + long theDate; // modification date/time + } SelectionRange; + #pragma options align=reset + static pascal OSErr do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) { *************** *** 7768,7778 **** --- 7779,7797 ---- AEKeyword keyword; DescType actual_type; Size actual_size; + SelectionRange position; err = AEGetParamDesc (message, keyDirectObject, typeAEList, &the_desc); if (err != noErr) goto descriptor_error_exit; + err = AEGetParamPtr (message, keyAEPosition, typeChar, &actual_type, &position, sizeof(SelectionRange), &actual_size); + if (err == noErr) + drag_and_drop_file_list = Fcons (list3 (make_number (position.lineNum + 1), + make_number (position.startRange + 1), + make_number (position.endRange + 1)), + drag_and_drop_file_list); + /* Check to see that we got all of the required parameters from the event descriptor. For an 'odoc' event this should just be the file list. */ ------=_Part_132_10345675.1101349237495 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------=_Part_132_10345675.1101349237495--