changeset 75831:906e93bebe5f

Change all uses of mac-set-font-panel-visibility to mac-set-font-panel-visible-p. (mac-ae-number): Return integer 0 if coerced result is float 0.0. (mac-ae-get-url): Call select-frame-set-input-focus. (mac-dnd-handle-drag-n-drop-event): Don't call select-frame-set-input-focus.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Tue, 13 Feb 2007 08:27:47 +0000
parents de1ac66b39ff
children 31ee92df53cf
files lisp/term/mac-win.el
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/mac-win.el	Tue Feb 13 06:34:01 2007 +0000
+++ b/lisp/term/mac-win.el	Tue Feb 13 08:27:47 2007 +0000
@@ -1585,7 +1585,10 @@
     (if (and type-data
 	     (setq str (mac-coerce-ae-data (car type-data)
 					   (cdr type-data) "TEXT")))
-	(string-to-number str)
+	(let ((num (string-to-number str)))
+	  ;; Mac OS Classic may return "0e+0" as the coerced value for
+	  ;; the type "magn" and the data "\000\000\000\000".
+	  (if (= num 0.0) 0 num))
       nil)))
 
 (defun mac-bytes-to-integer (bytes &optional from to)
@@ -1750,7 +1753,9 @@
   (let* ((ae (mac-event-ae event))
 	 (parsed-url (url-generic-parse-url (mac-ae-text ae))))
     (if (string= (url-type parsed-url) "mailto")
-	(url-mailto parsed-url)
+	(progn
+	  (url-mailto parsed-url)
+	  (select-frame-set-input-focus (selected-frame)))
       (mac-resume-apple-event ae t))))
 
 (setq mac-apple-event-map (make-sparse-keymap))
@@ -1796,7 +1801,7 @@
   'mac-handle-toolbar-switch-mode)
 
 ;;; Font panel
-(when (fboundp 'mac-set-font-panel-visibility)
+(when (fboundp 'mac-set-font-panel-visible-p)
 
 (define-minor-mode mac-font-panel-mode
   "Toggle use of the font panel.
@@ -1804,7 +1809,7 @@
   :init-value nil
   :global t
   :group 'mac
-  (mac-set-font-panel-visibility mac-font-panel-mode))
+  (mac-set-font-panel-visible-p mac-font-panel-mode))
 
 (defun mac-handle-font-panel-closed (event)
   "Update internal status in response to font panel closed EVENT."
@@ -1839,7 +1844,7 @@
 			   "Show the font panel as a floating dialog")
   'showhide-speedbar)
 
-) ;; (fboundp 'mac-set-font-panel-visibility)
+) ;; (fboundp 'mac-set-font-panel-visible-p)
 
 ;;; Text Services
 (defvar mac-ts-active-input-buf ""
@@ -2273,8 +2278,7 @@
     (dolist (item (mac-ae-list ae))
       (if (not (equal (car item) "null"))
 	  (mac-dnd-drop-data event (selected-frame) window
-			     (cdr item) (car item) action))))
-  (select-frame-set-input-focus (selected-frame)))
+			     (cdr item) (car item) action)))))
 
 ;;; Do the actual Windows setup here; the above code just defines
 ;;; functions and variables that we use now.