changeset 70730:3cbb04c6169f

(mac-bytes-to-digits): Remove function. (mac-handle-toolbar-switch-mode): Use coercion instead of it.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Fri, 19 May 2006 09:09:37 +0000
parents 9a90863c52b1
children a68a73705878
files lisp/term/mac-win.el
diffstat 1 files changed, 2 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/mac-win.el	Fri May 19 08:42:50 2006 +0000
+++ b/lisp/term/mac-win.el	Fri May 19 09:09:37 2006 +0000
@@ -1585,17 +1585,6 @@
 	(ash (lsh result extended-sign-len) (- extended-sign-len))
       result)))
 
-(defun mac-bytes-to-digits (bytes &optional from to)
-  (or from (setq from 0))
-  (or to (setq to (length bytes)))
-  (let ((len (- to from))
-	(val 0.0))
-    (dotimes (i len)
-      (setq val (+ (* val 256.0)
-		   (aref bytes (+ from (if (eq (byteorder) ?B) i
-					 (- len i 1)))))))
-    (format "%.0f" val)))
-
 (defun mac-ae-selection-range (ae)
 ;; #pragma options align=mac68k
 ;; typedef struct SelectionRange {
@@ -1693,7 +1682,8 @@
     (if (and modifiers (not (string= modifiers "\000\000\000\000")))
 	;; Globally toggle tool-bar-mode if some modifier key is pressed.
 	(tool-bar-mode)
-      (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae))))
+      (let ((window-id
+	     (mac-coerce-ae-data "long" (cdr (mac-ae-parameter ae)) "TEXT"))
 	    (rest (frame-list))
 	    frame)
 	(while (and (null frame) rest)