From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: running ./temacs Date: Tue, 31 May 2011 02:36:38 -0400 Message-ID: References: <83wro9bvjj.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1306823808 5664 80.91.229.12 (31 May 2011 06:36:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 May 2011 06:36:48 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 31 08:36:44 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRIZH-0007OP-MW for ged-emacs-devel@m.gmane.org; Tue, 31 May 2011 08:36:43 +0200 Original-Received: from localhost ([::1]:38802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIZH-00037Q-93 for ged-emacs-devel@m.gmane.org; Tue, 31 May 2011 02:36:43 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIZE-000379-3l for emacs-devel@gnu.org; Tue, 31 May 2011 02:36:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRIZC-0003vX-Qq for emacs-devel@gnu.org; Tue, 31 May 2011 02:36:40 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:34042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRIZC-0003vR-O6 for emacs-devel@gnu.org; Tue, 31 May 2011 02:36:38 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QRIZC-0004Rc-HX; Tue, 31 May 2011 02:36:38 -0400 In-Reply-To: (Dan Nicolaescu's message of "Tue, 31 May 2011 01:19:01 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139930 Archived-At: Dan Nicolaescu writes: > Stefan Monnier writes: > >>>> >>>>> [Hacking around this so that Vprocess_environment is initialized when >>>> >>>>> not dumping makes ./temacs work correctly] >>>> >>>> In case anyone wants to see the difference in behavior, here's the >>>> >>>> ugly hack: >>>> >>> Could you explain your code (i.e. why you need those strcmp hacks, why >>>> >>> you need to set&unset initialized, ...)? >>>> >> set_initial_environment only initializes Vprocess_environment if >>>> >> `initialized' is set. >>>> > Do you happen to know why? >>>> No idea. I'd speculate that it's undesirable to initialize it when >>>> dumping... >>> Yes, probably. >> >> So `initialized' is not the right variable to test. >> Maybe Vpurify_flag would be closer since it is a better indicator of >> whether we're about to dump or not, AFAIK. > > Vpurify_flag does not quite work. lread.c:init_obarray sets it > unconditionally: > > /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */ > Vpurify_flag = Qt; > > I checked in a simplified version of this and of > set_initial_environment. > ./temacs runs now. It starts up in -nw mode, but that's a different > issue. It would be great if someone could solve that one too... It looks like this is enough to get ./temacs run in X11 mode: === modified file 'src/dispnew.c' --- src/dispnew.c 2011-05-25 03:45:04 +0000 +++ src/dispnew.c 2011-05-31 06:17:37 +0000 @@ -6235,9 +6235,6 @@ init_display (void) } if (!inhibit_window_system && display_arg -#ifndef CANNOT_DUMP - && initialized -#endif ) { Vinitial_window_system = Qx; === modified file 'src/frame.c' --- src/frame.c 2011-05-29 00:45:00 +0000 +++ src/frame.c 2011-05-31 06:13:37 +0000 @@ -544,10 +544,8 @@ make_initial_frame (void) /* The default value of menu-bar-mode is t. */ set_menu_bar_lines (f, make_number (1), Qnil); -#ifdef CANNOT_DUMP if (!noninteractive) init_frame_faces (f); -#endif return f; } Any reason not to check this in?