all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [OS X] new variable for app bundle path
@ 2007-09-02  1:37 Seiji Zenitani
  2007-09-02  2:11 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 8+ messages in thread
From: Seiji Zenitani @ 2007-09-02  1:37 UTC (permalink / raw)
  To: emacs-devel

Hi,

Is it possible to provide a new variable for Carbon port, which  
stands for the application bundle path?  The application bundle path  
is a path for the double-clickable application icon (e.g. / 
Applications/Emacs.app), while the other emacs directories such as  
data-dir depend on the configuration option: /usr/local/share/share/ 
emacs/22.1/etc/ (default) or ${app_path}/Contents/Resources/etc/ (-- 
self-contained).  Usually a platform-only variable may not be  
favorable, but I believe the application bundle path is fundamental  
enough.  A patch to the EMACS_22_BASE branch is attached.  It works  
fine for me since June.  Similar variable will be easily introduced  
to the future Cocoa port, too.

Seiji Zenitani
zenitani@mac.com


--- src/mac.c.orig  2007-04-20 09:26:45.000000000 -0400
+++ src/mac.c       2007-06-09 18:54:42.000000000 -0400
@@ -93,6 +93,8 @@
  static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *,  
int));
  #endif

+Lisp_Object Vmac_app_path;
+
  /* When converting from Mac to Unix pathnames, /'s in folder names are
     converted to :'s.  This function, used in copying folder names,
     performs a strncat and converts all character a to b in the copy of
@@ -5402,6 +5406,10 @@
        if (stat (p, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR)
  	setenv ("INFOPATH", p, 1);
      }
+
+  strcpy (p, app_bundle_pathname);
+  Vmac_app_path = build_string(p);
+
  }
  #endif /* MAC_OSX */

@@ -5479,6 +5495,10 @@
  This is not a POSIX locale ID, but an ICU locale ID.  So encoding
  information is not included.  */);
    Vmac_system_locale = mac_get_system_locale ();
+
+  DEFVAR_LISP ("mac-app-path", &Vmac_app_path,
+    doc: /* Path to the Emacs application bundle.  */);
+
  }

  /* arch-tag: 29d30c1f-0c6b-4f88-8a6d-0558d7f9dbff

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-09-04  0:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-02  1:37 [OS X] new variable for app bundle path Seiji Zenitani
2007-09-02  2:11 ` YAMAMOTO Mitsuharu
2007-09-03  2:54   ` Seiji Zenitani
2007-09-03  3:16     ` YAMAMOTO Mitsuharu
2007-09-03  3:59       ` Seiji Zenitani
2007-09-03  4:18         ` YAMAMOTO Mitsuharu
2007-09-03 20:32           ` Seiji Zenitani
2007-09-04  0:15             ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.