[macemacsjp-cvs 20] CVS update: mac-key-mode

Back to archive index

Seiji Zenitani zenit****@users*****
2005年 7月 24日 (日) 09:14:17 JST


Index: mac-key-mode/mac-key-mode.el
diff -u mac-key-mode/mac-key-mode.el:1.2 mac-key-mode/mac-key-mode.el:1.3
--- mac-key-mode/mac-key-mode.el:1.2	Sat Jul  2 15:53:12 2005
+++ mac-key-mode/mac-key-mode.el	Sun Jul 24 09:14:17 2005
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2004-2005  Seiji Zenitani <zenit****@mac*****>
 
 ;; Author: Seiji Zenitani <zenit****@mac*****>
-;; Version: v20050702
+;; Version: v20050724
 ;; Keywords: tools, mac
 ;; Created: 2004-12-27
 ;; Compatibility: Mac OS X (Carbon Emacs)
@@ -99,8 +99,11 @@
     (define-key map [(alt left)] 'beginning-of-line)
     (define-key map [(alt right)] 'end-of-line)
     (define-key map [M-drag-n-drop] 'mac-drag-n-drop) ; [macemacsjp-english 99]
-;;     (define-key map [(alt \ )] 'toggle-input-method)
     (define-key map [A-mouse-1] 'browse-url-at-mouse) ; command + click
+    ;; for inline patch
+    (define-key map [(meta \ )] 'just-one-space)
+    (define-key map [(alt \ )] 'mac-im-update) ; for inline patch 20041229
+;    (define-key map [(alt \ )] 'toggle-input-method) ; for inline patch 20050328
     map)
   "Keymap for `mac-key-mode'.")
 
@@ -183,9 +186,18 @@
 (defun mac-key-show-in-finder ()
   "Document forthcoming..."
   (interactive)
-  (if (stringp (buffer-file-name))
-      (do-applescript
-       (format "
+  (let ((file nil))
+    (cond
+     ((and (local-variable-p 'dired-directory)
+           dired-directory
+           (string-match "\\.app/\\'" dired-directory))
+      (setq file dired-directory))
+     ((stringp (buffer-file-name))
+      (setq file (buffer-file-name))))
+
+    (if file
+        (do-applescript
+         (format "
 try
   tell application \"Finder\"
     select (\"%s\" as POSIX file)
@@ -194,18 +206,14 @@
 on error
   beep
 end try"
-               (if (eq selection-coding-system 'sjis-mac)
-                   (replace-regexp-in-string
-                    "\\\\" "\\\\\\\\"
-                    (encode-coding-string
-                     (buffer-file-name)
-                     selection-coding-system))
-                 (encode-coding-string
-                  (buffer-file-name)
-                  selection-coding-system))
+                 (if (eq selection-coding-system 'sjis-mac)
+                     (replace-regexp-in-string
+                      "\\\\" "\\\\\\\\"
+                      (encode-coding-string file selection-coding-system))
+                 (encode-coding-string file selection-coding-system))
                ))
     (shell-command "/usr/bin/open .")
-    ))
+    )))
 
 
 ;; Open Terminal.app


macemacsjp-cvs メーリングリストの案内
Back to archive index