Skip to content

Instantly share code, notes, and snippets.

@yosisa
Created July 13, 2011 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosisa/1080211 to your computer and use it in GitHub Desktop.
Save yosisa/1080211 to your computer and use it in GitHub Desktop.
Mac OSXでもK2Emacsでバイナリを指定できるように
diff --git keysnail/plugins/K2Emacs.ks.js keysnail/plugins/K2Emacs.ks.js
index 122d32a..31dd6bc 100644
--- keysnail/plugins/K2Emacs.ks.js
+++ keysnail/plugins/K2Emacs.ks.js
@@ -284,7 +284,7 @@ var ucjs_ExternalEditor = {
var editorFile;
var xulRuntime = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULRuntime);
- if ("Darwin" == xulRuntime.OS)
+ if ("Darwin" == xulRuntime.OS && editorPath.match('\.app$'))
{
// wrap with open command (inspired from GreaseMonkey)
args.unshift(editorPath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment