Add --no-site-lisp option, make -Q use it. (Bug#5707)
* lisp/Makefile.in (EMACSOPT): Add --no-site-lisp. * src/emacs.c (no_site_lisp): New int. (USAGE1): Add --no-site-lisp, mention -Q uses it. (main): Set no_site_lisp. (standard_args): Add --no-site-lisp. * src/lisp.h (no_site_lisp): New int. * src/lread.c (init_lread): If no_site_lisp, don't re-add site-lisp directories to Vload_path. * etc/NEWS: Mention --no-site-lisp.
This commit is contained in:
parent
83f3eadc06
commit
66b7b0fe80
7 changed files with 56 additions and 11 deletions
3
etc/NEWS
3
etc/NEWS
|
|
@ -59,6 +59,9 @@ automatically select it.
|
|||
command line arguments, and the EMACS_UNIBYTE environment variable, no
|
||||
longer have any effect. (They were declared obsolete in Emacs 23.)
|
||||
|
||||
** New command line option `--no-site-lisp' removes site-lisp directories
|
||||
from load-path. -Q now implies this.
|
||||
|
||||
|
||||
* Changes in Emacs 24.1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
2011-01-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (EMACSOPT): Add --no-site-lisp.
|
||||
|
||||
2011-01-06 Ken Manheimer <ken.manheimer@gmail.com>
|
||||
|
||||
* allout.el: (allout-back-to-current-heading): Ensure return to
|
||||
* allout.el (allout-back-to-current-heading): Ensure return to
|
||||
the visible containing topic, rather than a collapsed one.
|
||||
(allout-view-change-hook): Remove hook that was deprecated long
|
||||
ago.
|
||||
(allout-view-change-hook): Remove hook that was deprecated long ago.
|
||||
(allout-exposure-change-hook): Remove documentation remarks
|
||||
concerning removed allout-view-change-hook.
|
||||
(allout-flag-region): Remove invocation of and documentation
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Maintenance productions for the Lisp directory
|
||||
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
# 2009, 2010 Free Software Foundation, Inc.
|
||||
# 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of GNU Emacs.
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ EMACS = ${abs_top_builddir}/src/emacs
|
|||
|
||||
# Command line flags for Emacs.
|
||||
|
||||
EMACSOPT = -batch --no-site-file
|
||||
EMACSOPT = -batch --no-site-file --no-site-lisp
|
||||
|
||||
# Extra flags to pass to the byte compiler
|
||||
BYTE_COMPILE_EXTRA_FLAGS =
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
2011-01-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs.c (no_site_lisp): New int.
|
||||
(USAGE1): Add --no-site-lisp, mention -Q uses it.
|
||||
(main): Set no_site_lisp.
|
||||
(standard_args): Add --no-site-lisp.
|
||||
* lisp.h (no_site_lisp): New int.
|
||||
* lread.c (init_lread): If no_site_lisp, don't re-add site-lisp
|
||||
directories to Vload_path.
|
||||
|
||||
2011-01-05 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* alloc.c (mark_stack): Use __builtin_unwind_init if available.
|
||||
|
|
|
|||
30
src/emacs.c
30
src/emacs.c
|
|
@ -231,6 +231,9 @@ int noninteractive1;
|
|||
/* Nonzero means Emacs was run in --quick mode. */
|
||||
int inhibit_x_resources;
|
||||
|
||||
/* Nonzero means remove site-lisp directories from load-path. */
|
||||
int no_site_lisp;
|
||||
|
||||
/* Name for the server started by the daemon.*/
|
||||
static char *daemon_name;
|
||||
|
||||
|
|
@ -268,9 +271,11 @@ Initialization options:\n\
|
|||
--no-init-file, -q load neither ~/.emacs nor default.el\n\
|
||||
--no-shared-memory, -nl do not use shared memory\n\
|
||||
--no-site-file do not load site-start.el\n\
|
||||
--no-site-lisp, -nsl do not add site-lisp directories to load-path\n\
|
||||
--no-splash do not display a splash screen on startup\n\
|
||||
--no-window-system, -nw do not communicate with X, ignoring $DISPLAY\n\
|
||||
--quick, -Q equivalent to -q --no-site-file --no-splash\n\
|
||||
--quick, -Q equivalent to:\n\
|
||||
-q --no-site-file --no-site-lisp --no-splash\n\
|
||||
--script FILE run FILE as an Emacs Lisp script\n\
|
||||
--terminal, -t DEVICE use DEVICE for terminal I/O\n\
|
||||
--user, -u USER load ~USER/.emacs instead of your own\n\
|
||||
|
|
@ -1341,6 +1346,9 @@ main (int argc, char **argv)
|
|||
no_loadup
|
||||
= argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
|
||||
|
||||
no_site_lisp
|
||||
= argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
|
||||
|
||||
#ifdef HAVE_NS
|
||||
ns_alloc_autorelease_pool();
|
||||
if (!noninteractive)
|
||||
|
|
@ -1409,9 +1417,27 @@ main (int argc, char **argv)
|
|||
&& argv[count_before + 1][1] == '-')
|
||||
argv[count_before + 1] = "-d";
|
||||
|
||||
if (! no_site_lisp)
|
||||
{
|
||||
if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
|
||||
|| argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
|
||||
no_site_lisp = 1;
|
||||
}
|
||||
|
||||
/* Don't actually discard this arg. */
|
||||
skip_args = count_before;
|
||||
}
|
||||
#else /* !HAVE_X_WINDOWS */
|
||||
if (! no_site_lisp)
|
||||
{
|
||||
int count_before = skip_args;
|
||||
|
||||
if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
|
||||
|| argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
|
||||
no_site_lisp = 1;
|
||||
|
||||
skip_args = count_before;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* argmatch must not be used after here,
|
||||
|
|
@ -1743,10 +1769,12 @@ const struct standard_args standard_args[] =
|
|||
{ "-daemon", "--daemon", 99, 0 },
|
||||
{ "-help", "--help", 90, 0 },
|
||||
{ "-nl", "--no-loadup", 70, 0 },
|
||||
{ "-nsl", "--no-site-lisp", 65, 0 },
|
||||
/* -d must come last before the options handled in startup.el. */
|
||||
{ "-d", "--display", 60, 1 },
|
||||
{ "-display", 0, 60, 1 },
|
||||
/* Now for the options handled in `command-line' (startup.el). */
|
||||
/* (Note that to imply -nsl, -Q is partially handled here.) */
|
||||
{ "-Q", "--quick", 55, 0 },
|
||||
{ "-quick", 0, 55, 0 },
|
||||
{ "-q", "--no-init-file", 50, 0 },
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* Fundamental definitions for GNU Emacs Lisp interpreter.
|
||||
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
|
@ -3225,6 +3225,9 @@ extern int noninteractive;
|
|||
/* Nonzero means don't load X resources or Windows Registry settings. */
|
||||
extern int inhibit_x_resources;
|
||||
|
||||
/* Nonzero means remove site-lisp directories from load-path. */
|
||||
extern int no_site_lisp;
|
||||
|
||||
/* Pipe used to send exit notification to the daemon parent at
|
||||
startup. */
|
||||
extern int daemon_pipe[2];
|
||||
|
|
@ -3668,5 +3671,3 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object);
|
|||
|
||||
#endif /* EMACS_LISP_H */
|
||||
|
||||
/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e
|
||||
(do not change this comment) */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1997,
|
||||
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
|
|
@ -4086,7 +4086,7 @@ init_lread (void)
|
|||
Vload_path = Fcons (tem, Vload_path);
|
||||
}
|
||||
}
|
||||
if (!NILP (sitelisp))
|
||||
if (!NILP (sitelisp) && !no_site_lisp)
|
||||
Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue