Ticket #41224: emacs-app-home.patch

File emacs-app-home.patch, 2.1 KB (added by andy@…, 11 years ago)

includes the two fixes from emacs Repository

  • dports/aqua/emacs-app/Portfile

    index 9341ad5..d8b75f8 100644
    a b PortSystem 1.0 
    55
    66name                emacs-app
    77version             24.3
    8 revision            1
     8revision            2
    99categories          aqua editors
    1010maintainers         hum css openmaintainer
    1111
    depends_lib port:ncurses \ 
    3636                    port:libxml2 \
    3737                    port:gnutls
    3838
    39 patchfiles          patch-src_emacs.c.diff
     39patchfiles          patch-mavericks-home.diff patch-mavericks-psn.diff patch-src_emacs.c.diff
    4040
    4141post-patch {
    4242    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/src/emacs.c
  • new file dports/aqua/emacs-app/files/patch-mavericks-home.diff

    diff --git a/dports/aqua/emacs-app/files/patch-mavericks-home.diff b/dports/aqua/emacs-app/files/patch-mavericks-home.diff
    new file mode 100644
    index 0000000..ae884df
    - +  
     1--- src/emacs.c.orig
     2+++ src/emacs.c
     3@@ -1156,10 +1156,13 @@
     4   if (!noninteractive)
     5     {
     6 #ifdef NS_IMPL_COCOA
     7-      if (skip_args < argc)
     8+      /* Started from GUI? */
     9+      /* FIXME: Do the right thing if getenv returns NULL, or if
     10+         chdir fails.  */
     11+      if (! inhibit_window_system && ! isatty (0))
     12+        chdir (getenv ("HOME"));
     13+      else if (skip_args < argc)
     14         {
     15-         /* FIXME: Do the right thing if getenv returns NULL, or if
     16-            chdir fails.  */
     17           if (!strncmp (argv[skip_args], "-psn", 4))
     18             {
     19               skip_args += 1;
  • new file dports/aqua/emacs-app/files/patch-mavericks-psn.diff

    diff --git a/dports/aqua/emacs-app/files/patch-mavericks-psn.diff b/dports/aqua/emacs-app/files/patch-mavericks-psn.diff
    new file mode 100644
    index 0000000..7c25d30
    - +  
     1--- src/emacs.c.orig
     2+++ src/emacs.c
     3@@ -1201,7 +1201,7 @@
     4          chdir fails.  */
     5       if (! inhibit_window_system && ! isatty (0))
     6         chdir (getenv ("HOME"));
     7-      else if (skip_args < argc)
     8+      if (skip_args < argc)
     9         {
     10           if (!strncmp (argv[skip_args], "-psn", 4))
     11             {