diff options
| author | Kazuhiro NISHIYAMA | 2013-11-02 23:01:27 +0900 |
|---|---|---|
| committer | Misty De Meo | 2013-11-06 09:45:52 -0500 |
| commit | 7f94d650f2d6cb38bb0ae405c6098b3400a0edd6 (patch) | |
| tree | cce1ad408f1983a21a3d168208791cbaf1737325 /Library/Formula | |
| parent | 6dc9f4d01d00c5bdb84541e1e2eb57d3434a56c9 (diff) | |
| download | homebrew-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/Formula')
| -rw-r--r-- | Library/Formula/emacs.rb | 26 |
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; |
