diff options
| author | YAMAMOTO Mitsuharu | 2006-01-05 08:13:11 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-01-05 08:13:11 +0000 |
| commit | a149e872d416485eab5ef61ae878cebfa10b83a8 (patch) | |
| tree | e42698cfa918e3a44146fbbb675aff73a2a971a5 | |
| parent | b568ce767277fca4d4376c8d0c9b50246b4f2de3 (diff) | |
| download | emacs-a149e872d416485eab5ef61ae878cebfa10b83a8.tar.gz emacs-a149e872d416485eab5ef61ae878cebfa10b83a8.zip | |
(mac-ae-parameter): Don't coerce data if it is
already of desired type.
(mac-ae-list): Coerce parameter to "list" type.
(mac-dispatch-apple-event): Replace cadr part of event with a
dummy position so that event-start returns it.
| -rw-r--r-- | lisp/term/mac-win.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 159a9da2cc3..bef495ab616 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1381,7 +1381,7 @@ in `selection-converter-alist', which see." | |||
| 1381 | (put 'core-event 'mac-apple-event-class "aevt") ; kCoreEventClass | 1381 | (put 'core-event 'mac-apple-event-class "aevt") ; kCoreEventClass |
| 1382 | (put 'internet-event 'mac-apple-event-class "GURL") ; kAEInternetEventClass | 1382 | (put 'internet-event 'mac-apple-event-class "GURL") ; kAEInternetEventClass |
| 1383 | 1383 | ||
| 1384 | ;;; Event IDs | 1384 | ;;; Event IDs |
| 1385 | ;; kCoreEventClass | 1385 | ;; kCoreEventClass |
| 1386 | (put 'open-application 'mac-apple-event-id "oapp") ; kAEOpenApplication | 1386 | (put 'open-application 'mac-apple-event-id "oapp") ; kAEOpenApplication |
| 1387 | (put 'reopen-application 'mac-apple-event-id "rapp") ; kAEReopenApplication | 1387 | (put 'reopen-application 'mac-apple-event-id "rapp") ; kAEReopenApplication |
| @@ -1409,14 +1409,14 @@ in `selection-converter-alist', which see." | |||
| 1409 | (error "Not an Apple event: %S" ae) | 1409 | (error "Not an Apple event: %S" ae) |
| 1410 | (let ((type-data (cdr (assoc keyword (cdr ae)))) | 1410 | (let ((type-data (cdr (assoc keyword (cdr ae)))) |
| 1411 | data) | 1411 | data) |
| 1412 | (when (and type type-data) | 1412 | (when (and type type-data (not (equal type (car type-data)))) |
| 1413 | (setq data (mac-coerce-ae-data (car type-data) (cdr type-data) type)) | 1413 | (setq data (mac-coerce-ae-data (car type-data) (cdr type-data) type)) |
| 1414 | (setq type-data (if data (cons type data) nil))) | 1414 | (setq type-data (if data (cons type data) nil))) |
| 1415 | type-data))) | 1415 | type-data))) |
| 1416 | 1416 | ||
| 1417 | (defun mac-ae-list (ae &optional keyword type) | 1417 | (defun mac-ae-list (ae &optional keyword type) |
| 1418 | (or keyword (setq keyword "----")) ;; Direct object. | 1418 | (or keyword (setq keyword "----")) ;; Direct object. |
| 1419 | (let ((desc (mac-ae-parameter ae keyword))) | 1419 | (let ((desc (mac-ae-parameter ae keyword "list"))) |
| 1420 | (cond ((null desc) | 1420 | (cond ((null desc) |
| 1421 | nil) | 1421 | nil) |
| 1422 | ((not (equal (car desc) "list")) | 1422 | ((not (equal (car desc) "list")) |
| @@ -1588,6 +1588,9 @@ Currently the `mailto' scheme is supported." | |||
| 1588 | (setq service-message | 1588 | (setq service-message |
| 1589 | (intern (decode-coding-string service-message 'utf-8))) | 1589 | (intern (decode-coding-string service-message 'utf-8))) |
| 1590 | (setq binding (lookup-key binding (vector service-message)))) | 1590 | (setq binding (lookup-key binding (vector service-message)))) |
| 1591 | ;; Replace (cadr event) with a dummy position so that event-start | ||
| 1592 | ;; returns it. | ||
| 1593 | (setcar (cdr event) (list (selected-window) (point) '(0 . 0) 0)) | ||
| 1591 | (call-interactively binding))) | 1594 | (call-interactively binding))) |
| 1592 | 1595 | ||
| 1593 | (global-set-key [mac-apple-event] 'mac-dispatch-apple-event) | 1596 | (global-set-key [mac-apple-event] 'mac-dispatch-apple-event) |