git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Samuel Bronson <naesten@gmail.com>
To: markus.heidelberg@web.de
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH 3/3] Makefile: add commented out 's for Emacs here, too
Date: Sat, 30 May 2009 14:37:14 -0400	[thread overview]
Message-ID: <db65a1cd0905301137o482d9b14se0c438678fb4e4dd@mail.gmail.com> (raw)
In-Reply-To: <200905301505.38016.markus.heidelberg@web.de>

On Sat, May 30, 2009 at 9:05 AM, Markus Heidelberg
<markus.heidelberg@web.de> wrote:

>> +# The above comment is in case there is an odd number of _SQ
>> +# definitions above, since they seem to confuse Emacs. If there is an
>> +# even number of such definitions, it does no harm, since emacs
>> +# doesn't recognize string delimiters inside recognized comments.
>
> This doesn't only confuse Emacs, so the subject should be changed to
> something like "... to unconfuse editors' syntax highlighting" and be
> squashed with Patch 1/3, since this is exactly the same issue.
>
> I think this is way too much comment and would prefer none at all. I
> also would remove the global 4-line comment.

Okay. I guess I'll save it for the commit message (rewritten to match
the changes suggested below), maybe keep two words for the first one
in each Makefile ...

> But Vim for example is not satisfied with your fix above. It needs this
> workaround for every line and additionally needs a closing parenthesis,
> because the real one is hidden in the string. So this would work for
> Vim:
>
>  PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
> +#')
>  TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
> +#')

Yeah, emacs would work better that way too -- I was going for a
low-disruption patch, and was mostly interested in making sure
unrelated portions of the Makefile didn't get swallowed by
string-coloring. I didn't particularly care about the parentheses --
does Vim care about that for indentation, or just paren-matching?

I wonder why emacs and vim both have the same problem with that
construct ... and how hard it would be to fix. (Thankfully, this
approach to dealing with the breakage will not confuse corrected
versions, since they will basically ignore the contents of the
comments for syntax highlighting purposes :-).

> Maybe even behind the concerned line to avoid clutter, if this doesn't
> cause other problems:
>
> -PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
> +PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))#')
> -TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
> +TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))#')

That should at least work a lot better than my initial attempt at 1/3,
where I had a space before the # -- the space broke the build, which
is actually how I ended up noticing the need for 2/3 .

  reply	other threads:[~2009-05-30 18:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 22:07 [PATCH 1/3] Documentation/Makefile: add a commented-out ' to unconfuse Emacs Samuel Bronson
2009-05-25 22:07 ` [PATCH 2/3] Makefile: Add "make help" telling users to read INSTALL and Makefile Samuel Bronson
2009-05-25 22:07   ` [PATCH 3/3] Makefile: add commented out 's for Emacs here, too Samuel Bronson
2009-05-30 13:05     ` Markus Heidelberg
2009-05-30 18:37       ` Samuel Bronson [this message]
2009-05-30 19:07       ` Junio C Hamano
2009-05-30 22:01         ` Markus Heidelberg
2013-12-19 23:37           ` Samuel Bronson
2013-12-19 23:52             ` Jonathan Nieder

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=db65a1cd0905301137o482d9b14se0c438678fb4e4dd@mail.gmail.com \
    --to=naesten@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=markus.heidelberg@web.de \
    /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://80x24.org/mirrors/git.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).