From: Vincent LADEUIL <v.ladeuil@free.fr>
Subject: [MAC_OSX] [PATCH] Paths setting for bundle
Date: 11 Apr 2003 22:03:37 +0200 [thread overview]
Message-ID: <45354.821792762$1050091769@news.gmane.org> (raw)
The following patch solve a weird side-effect regarding access to
files embedded in a bundle : as installation paths cannot be
determined at build time, init_mac_osx_environment elegantly use
environment variables to restore simple access.
The weird part is : these variables are inherited by child
processes, when this child is a different version of emacs to be
debugged, wrong paths are obtained.
2003-04-11 Vincent LADEUIL <v.ladeuil@free.fr>
* emacs.c (main): Under MAC_OSX, avoid polluting
environment of child processes with variables related to
bundle paths.
Index: src/emacs.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/emacs.c,v
retrieving revision 1.325
diff -u -r1.325 emacs.c
--- src/emacs.c 18 Dec 2002 06:16:28 -0000 1.325
+++ src/emacs.c 11 Apr 2003 19:41:10 -0000
@@ -1381,11 +1381,6 @@
init_ntproc (); /* must precede init_editfns. */
#endif
-#ifdef HAVE_CARBON
- if (initialized)
- init_mac_osx_environment ();
-#endif
-
/* egetenv is a pretty low-level facility, which may get called in
many circumstances; it seems flimsy to put off initializing it
until calling init_callproc. */
@@ -1398,6 +1393,16 @@
putenv ("LANG=C");
#endif
+#ifdef HAVE_CARBON
+ /* init_mac_osx_environment will use environment variables to
+ * setup various emacs paths iff installed as a bundle. By
+ * setting environment variables *AFTER* calling
+ * set_process_environment (above), we avoid polluting child
+ * processes */
+ if (initialized)
+ init_mac_osx_environment ();
+#endif
+
init_buffer (); /* Init default directory of main buffer. */
init_callproc_1 (); /* Must precede init_cmdargs and init_sys_modes. */
This is my first contribution, feel free to educate me if I've
made something wrong,
Vincent
reply other threads:[~2003-04-11 20:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='45354.821792762$1050091769@news.gmane.org' \
--to=v.ladeuil@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).