From 2df102287e7cf5fe20b38961413a468d94d99824 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 20 Nov 2013 19:21:50 -0500 Subject: [PATCH] Use path-separator with -L, rather than just : * lisp/startup.el (command-line-1): Use path-separator with -L. * test/automated/Makefile.in (PATH_SEPARATOR): New, set by configure. (EMACSOPT): Use PATH_SEPARATOR. * doc/emacs/cmdargs.texi (Action Arguments): Use path-separator with -L. * etc/NEWS: Related edit. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/cmdargs.texi | 2 ++ etc/NEWS | 3 ++- lisp/ChangeLog | 4 ++++ lisp/startup.el | 2 +- test/ChangeLog | 5 +++++ test/automated/Makefile.in | 6 +++++- 7 files changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 7f051e751e5..229929d132d 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2013-11-21 Glenn Morris + + * cmdargs.texi (Action Arguments): Use path-separator with -L. + 2013-11-04 Glenn Morris * cmdargs.texi (Action Arguments): Mention that `-L :...' appends. diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 143e03cde63..92861c443f1 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -142,6 +142,8 @@ relative order; i.e., using @samp{-L /foo -L /bar} results in a @code{load-path} of the form @code{("/foo" "/bar" @dots{})}. If @var{dir} begins with @samp{:}, Emacs removes the @samp{:} and appends (rather than prepends) the remainder to @code{load-path}. +(On MS Windows, use @samp{;} instead of @samp{:}; i.e., use +the value of @code{path-separator}.) @item -f @var{function} @opindex -f diff --git a/etc/NEWS b/etc/NEWS index 33103f72775..97ae6c79d20 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -64,7 +64,8 @@ To use the old backend by default, do on the command line: +++ ** The -L option, which normally prepends its argument to load-path, -will instead append, if the argument begins with `:'. +will instead append, if the argument begins with `:' (or `;' on MS Windows; +i.e., `path-separator'). * Changes in Emacs 24.4 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 93b51580a23..d24ab3bc837 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-11-21 Glenn Morris + + * startup.el (command-line-1): Use path-separator with -L. + 2013-11-20 Teodor Zlatanov * emacs-lisp/package.el (describe-package-1): Add package archive diff --git a/lisp/startup.el b/lisp/startup.el index 2394c73b879..88ec1f359eb 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -2219,7 +2219,7 @@ A fancy display is used on graphic displays, normal otherwise." ;; -L :/foo adds /foo to the _end_ of load-path. (let (append) (if (string-match-p - "\\`:" + (format "\\`%s" path-separator) (setq tem (or argval (pop command-line-args-left)))) (setq tem (substring tem 1) append t)) diff --git a/test/ChangeLog b/test/ChangeLog index 35a168ce0c4..601c8d3bb82 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2013-11-21 Glenn Morris + + * automated/Makefile.in (PATH_SEPARATOR): New, set by configure. + (EMACSOPT): Use PATH_SEPARATOR. + 2013-11-18 Paul Eggert Improve API of recently-added bool vector functions (Bug#15912). diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in index 617768995f1..ced75f0b583 100644 --- a/test/automated/Makefile.in +++ b/test/automated/Makefile.in @@ -22,13 +22,17 @@ SHELL = @SHELL@ srcdir = @srcdir@ VPATH = $(srcdir) +PATH_SEPARATOR = @PATH_SEPARATOR@ + # We never change directory before running Emacs, so a relative file # name is fine, and makes life easier. If we need to change # directory, we can use emacs --chdir. EMACS = ../../src/emacs # Command line flags for Emacs. -EMACSOPT = -batch --no-site-file --no-site-lisp -L :$(srcdir) +# Apparently MSYS bash would convert "-L :" to "-L ;" anyway, +# but we might as well be explicit. +EMACSOPT = -batch --no-site-file --no-site-lisp -L $(PATH_SEPARATOR)$(srcdir) # Extra flags to pass to the byte compiler. BYTE_COMPILE_EXTRA_FLAGS = -- 2.39.2