unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ben Key <bkey76@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs-devel@gnu.org
Subject: Re: Supporting parameters that include the = character in configure.bat
Date: Sun, 10 Apr 2011 03:46:39 -0500	[thread overview]
Message-ID: <BANLkTinUDmrmJM91-dVxYASdppFAreuSag@mail.gmail.com> (raw)
In-Reply-To: <E1Q8pn6-0004dX-Oi@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1576 bytes --]

Hello,

Eli Zaretskii wrote:
> This isn't a problem, because we don't support building Emacs on
> Windows 9X anyway.

I was not aware of this.  Configure.bat still has some comments that refer
to Windows 9x and command.com so I thought it was still a consideration.

> So please prepare a patch along these lines.  It should include a
> corresponding addition to the "usage" text in the batch file and a
> similar addition to instructions in nt/INSTALL.

Before submitting a patch I wanted to do some more research into this
technique to ensure that it will always work.  It turns out that the %~1
functionality to strip " characters only works if command extensions are
enabled.  As far as I know they are always enabled by default but they can
be disabled by a system administrator.  This means that it will still be
necessary to determine if command extensions are enabled before attempting
to use this functionality.  This can be done as follows.

<batch_file>
@echo off
set use_extensions=1
setlocal enableextensions
if errorlevel 1 set use_extensions=0

set sep1=
:again

if "%1" == "--cflags" goto usercflags
if "%1" == "" goto checkutils

:usercflags

if "%use_extensions%" == "1" goto ucflagex
goto ucflag

:ucflagex
shift
set usercflags=%usercflags%%sep1%%~1
set sep1= %nothing%
shift
goto again

:ucflag
shift
set usercflags=%usercflags%%sep1%%1
set sep1= %nothing%
shift
goto again

:checkutils

echo usercflags=%usercflags%
</batch_file>

I assume that I should use this technique when implementing my patch.  If
this is what you want me to do, just let me know.

[-- Attachment #2: Type: text/html, Size: 1924 bytes --]

  reply	other threads:[~2011-04-10  8:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10  7:51 Supporting parameters that include the = character in configure.bat Ben Key
2011-04-10  8:14 ` Eli Zaretskii
2011-04-10  8:46   ` Ben Key [this message]
2011-04-10  9:49     ` Eli Zaretskii
     [not found]       ` <BANLkTi=QekwZQLVSoMFE0sTO+RRGAGackQ@mail.gmail.com>
2011-04-10 16:36         ` Eli Zaretskii
2011-04-12  0:17           ` Ben Key
2011-04-12  2:41             ` Ben Key
2011-04-12  5:08               ` Eli Zaretskii
2011-04-13 23:17                 ` Ben Key
2011-04-14  5:11                   ` Eli Zaretskii
2011-04-14 10:38                     ` Juanma Barranquero
2011-04-15  0:56                       ` Ben Key
2011-04-15  9:45                         ` Eli Zaretskii
2011-04-12  2:48             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinUDmrmJM91-dVxYASdppFAreuSag@mail.gmail.com \
    --to=bkey76@gmail.com \
    --cc=Emacs-devel@gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).