From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.bugs Subject: bug#10208: site-lisp directories in load-path after --no-site-lisp Date: Sat, 07 Jan 2012 18:18:32 +0100 Message-ID: <87ipknfn2v.fsf@Rainer.invalid> References: <87ipkrw8y7.fsf@Rainer.invalid> <87zke0mr38.fsf@Rainer.invalid> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1325956808 31895 80.91.229.12 (7 Jan 2012 17:20:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2012 17:20:08 +0000 (UTC) To: 10208@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 07 18:20:04 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1RjZw4-0000NQ-F5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2012 18:20:04 +0100 Original-Received: from localhost ([::1]:37180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjZw3-0006Dh-MT for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2012 12:20:03 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjZw0-0006DO-HU for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:20:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjZvz-0003sO-Bk for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:20:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjZvz-0003sK-8i for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:19:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RjZw2-0002yO-Fl for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:20:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Achim Gratz Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2012 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10208 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132595674811360 (code B ref -1); Sat, 07 Jan 2012 17:20:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Jan 2012 17:19:08 +0000 Original-Received: from localhost ([127.0.0.1]:49140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjZvA-0002xB-0C for submit@debbugs.gnu.org; Sat, 07 Jan 2012 12:19:08 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38685) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjZv6-0002wh-CX for submit@debbugs.gnu.org; Sat, 07 Jan 2012 12:19:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjZuw-0003kt-OD for submit@debbugs.gnu.org; Sat, 07 Jan 2012 12:18:55 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:35347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjZuw-0003kp-Mk for submit@debbugs.gnu.org; Sat, 07 Jan 2012 12:18:54 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjZus-0005ou-IM for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:18:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjZur-0003kU-36 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:18:50 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:43202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjZuq-0003kQ-JP for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 12:18:48 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RjZup-0008Aw-FC for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 18:18:47 +0100 Original-Received: from pd9eb39d4.dip.t-dialin.net ([217.235.57.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jan 2012 18:18:47 +0100 Original-Received: from Stromeko by pd9eb39d4.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jan 2012 18:18:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 67 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb39d4.dip.t-dialin.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:5fx747lH9ypn2OSz9cGfmg75HkI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55518 Archived-At: Achim Gratz writes: > I must be missing something or the option never propagates to lread.c? The whole incantation that removes the site-lisp from load-path is safeguarded with "if (!NILP (Vinstallation_directory))", so for the installed Emacs the --no-site-lisp option is never actually acted upon, since installation-directory is nil. The places to safeguard are actually further down, so the following patch (I have not touched indentation to minimize the number of changed lines) would allow --no-site-lisp to take effect as described in the man page (the way I've read it, anyway). --8<---------------cut here---------------start------------->8--- diff --git a/src/lread.c b/src/lread.c index 8e6b6f6..6367370 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4128,10 +4128,9 @@ init_lread (void) { if (! NILP (Fequal (dump_path, Vload_path))) { + int nilp_inst_dir = NILP (Vinstallation_directory); + Lisp_Object tem, tem1, sitelisp; Vload_path = decode_env_path (0, normal); - if (!NILP (Vinstallation_directory)) - { - Lisp_Object tem, tem1, sitelisp; /* Remove site-lisp dirs from path temporarily and store them in sitelisp, then conc them on at the end so @@ -4169,6 +4168,7 @@ init_lread (void) Lisp dirs instead. */ Vload_path = nconc2 (Vload_path, dump_path); + if (!nilp_inst_dir) { /* Add leim under the installation dir, if it exists. */ tem = Fexpand_file_name (build_string ("leim"), Vinstallation_directory); @@ -4191,7 +4191,7 @@ init_lread (void) Vload_path = Fcons (tem, Vload_path); } } - + } /* If Emacs was not built in the source directory, and it is run from where it was built, add to load-path the lisp, leim and site-lisp dirs under that directory. */ @@ -4237,7 +4237,7 @@ init_lread (void) } if (!NILP (sitelisp) && !no_site_lisp) Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path); - } + } } else --8<---------------cut here---------------end--------------->8--- HTH, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada