Subject: Re: bug#14513: 24.3.50; Site load-path pieces differ in MSYS build

From: Richard Copley <[email-masked]>
Date: Sun, 2 Jun 2013 12:33:08 +0100

On 1 June 2013 17:38, Eli Zaretskii <[email-masked]> wrote:

> Does it support Windows style paths and the ';' separator, as in
>
>   --locallisppath='%emacs_dir%/../site-lisp;d:/wherever/site-lisp'
>
> ?  MSYS supports both Windows style file names and Windows style in
> --prefix, so I'd like to support both styles in --locallisppath.
>

> Date: Sat, 1 Jun 2013 18:25:14 +0100
> From: Richard Copley <[email-masked]>
> [...] that's not possible without resorting to
> heuristics, because ${locallisppath} is potentially a ":"-separated path.

The attached patch supports both styles. The heuristics didn't turn
out to be as hairy as I imagined.

A few test cases:

nt/msysconfig.sh
#define PATH_SITELOADSEARCH
"%emacs_dir%/share/emacs/24.3.50/site-lisp;%emacs_dir%/share/emacs/site-lisp"

nt/msysconfig.sh --prefix c:/emacs/emacs-112809
#define PATH_SITELOADSEARCH
"%emacs_dir%/share/emacs/24.3.50/site-lisp;%emacs_dir%/share/emacs/site-lisp"

nt/msysconfig.sh --prefix="c:\\Program Files (x86)\\Emacs"
#define PATH_SITELOADSEARCH
"%emacs_dir%/share/emacs/24.3.50/site-lisp;%emacs_dir%/share/emacs/site-lisp"

nt/msysconfig.sh --prefix="c:/Program Files (x86)/Emacs"
--enable-locallisppath="%emacs_dir%/../site-lisp;d:/wherever/site-lisp"
#define PATH_SITELOADSEARCH
"%emacs_dir%/../site-lisp/;d:/wherever/site-lisp"

nt/msysconfig.sh --prefix="c:/Program Files (x86)/Emacs"
--enable-locallisppath="%emacs_dir%/../site-lisp;/d/wherever/site-lisp"
#define PATH_SITELOADSEARCH
"%emacs_dir%/../site-lisp/;d:/wherever/site-lisp"

nt/msysconfig.sh --prefix="/usr/local"
--enable-locallisppath="/usr/local/share/my-site-lisp"
#define PATH_SITELOADSEARCH "%emacs_dir%/share/my-site-lisp"