git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] Makefile: add commented out 's for Emacs here, too

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
May 30, 2009, 13:05 UTC
Message-ID
<200905301505.38016.markus.heidelberg@web.de>
In-Reply-To
<1243289231-32500-3-git-send-email-naesten@gmail.com>
Samuel Bronson, 26.05.2009:
Show 19 quoted lines
> Signed-off-by: Samuel Bronson <naesten@gmail.com>
> ---
>  Makefile |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 07a141d..b485c21 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1190,6 +1190,13 @@ prefix_SQ = $(subst ','\'',$(prefix))
>  SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
>  PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
>  TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
> +# unconfuse Emacs: '
> +
> +# 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.

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))
+#')

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))#')

But I'm not completely confident of this fix anyway and don't know whether it should be included at all.

Markus
Previous: Samuel BronsonNext: Samuel Bronson
Message 4 of 9 in “Documentation/Makefile: add a commented-out ' to unconfuse Emacs”
  1. 1/3 Documentation/Makefile: add a commented-out ' to unconfuse EmacsSamuel Bronson, May 25, 2009
  2. 2/3 Makefile: Add "make help" telling users to read INSTALL and MakefileSamuel Bronson, May 25, 2009
  3. 3/3 Makefile: add commented out 's for Emacs here, tooSamuel Bronson, May 25, 2009
  4. Markus HeidelbergMay 30, 2009
  5. Samuel BronsonMay 30, 2009
  6. Junio C HamanoMay 30, 2009
  7. Markus HeidelbergMay 30, 2009
  8. Samuel BronsonDec 19, 2013
  9. Jonathan NiederDec 19, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.