aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA2013-11-02 23:01:27 +0900
committerMisty De Meo2013-11-06 09:45:52 -0500
commit7f94d650f2d6cb38bb0ae405c6098b3400a0edd6 (patch)
treecce1ad408f1983a21a3d168208791cbaf1737325 /Library
parent6dc9f4d01d00c5bdb84541e1e2eb57d3434a56c9 (diff)
downloadhomebrew-7f94d650f2d6cb38bb0ae405c6098b3400a0edd6.tar.bz2
emacs: fix default-directory on Cocoa and 10.9
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/emacs.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb
index 18d0e442e..06977466a 100644
--- a/Library/Formula/emacs.rb
+++ b/Library/Formula/emacs.rb
@@ -34,6 +34,12 @@ class Emacs < Formula
cause "Duplicate symbol errors while linking."
end
+ def patches
+ {
+ :p0 => DATA, # fix default-directory on Cocoa and Mavericks.
+ }
+ end
+
# Follow MacPorts and don't install ctags from Emacs. This allows Vim
# and Emacs and ctags to play together without violence.
def do_not_install_ctags
@@ -126,3 +132,23 @@ class Emacs < Formula
return s
end
end
+
+__END__
+--- src/emacs.c.orig 2013-02-06 13:33:36.000000000 +0900
++++ src/emacs.c 2013-11-02 22:38:45.000000000 +0900
+@@ -1158,10 +1158,13 @@
+ if (!noninteractive)
+ {
+ #ifdef NS_IMPL_COCOA
++ /* Started from GUI? */
++ /* FIXME: Do the right thing if getenv returns NULL, or if
++ chdir fails. */
++ if (! inhibit_window_system && ! isatty (0))
++ chdir (getenv ("HOME"));
+ if (skip_args < argc)
+ {
+- /* FIXME: Do the right thing if getenv returns NULL, or if
+- chdir fails. */
+ if (!strncmp (argv[skip_args], "-psn", 4))
+ {
+ skip_args += 1;