all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: 18405@debbugs.gnu.org
Subject: bug#18405: 24.3.93; bat-mode.el
Date: Thu, 04 Sep 2014 20:44:50 +0200	[thread overview]
Message-ID: <87mwaf2pjx.fsf@Rainer.invalid> (raw)


In GNU Emacs 24.3.93.1 (i686-pc-linux-gnu, GTK+ Version 3.12.2)
 of 2014-08-24 on Rainer.invalid
Windowing system distributor `The X.Org Foundation', version 11.0.11403901
System Description:	openSUSE 13.1 (Bottle) (i586)

The fontlock pattern for environment variables ins bat-mode.el is

        ("%\\(\\w+\\)%?"
         (1 font-lock-variable-name-face))
        ("!\\(\\w+\\)!?"                ; delayed-expansion !variable!
         (1 font-lock-variable-name-face))

For CMD.EXE at least from Windows 7 onward (I've also tested with the
cmd.exe that comes with Wine), the name of an environment variable can
actually be any character including shell special characters (which
you'd then have to quote separately).  While it's possible to define a
variable that has a "%" character in its name, it can not be used it in
cmd itself since it never gets expanded, so the easiest replacement
pattern would be

        ("%\\([^%]+\\)%?"
         (1 font-lock-variable-name-face))
        ("!\\([^!%]+\\)!?"                ; delayed-expansion !variable!
         (1 font-lock-variable-name-face))

I've noticed this discrepancy when using variables with underscores in
their name, which only fontified the part up to the first underscore
correctly.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds





             reply	other threads:[~2014-09-04 18:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 18:44 Achim Gratz [this message]
2014-09-04 20:39 ` bug#18405: 24.3.93; bat-mode.el Stefan Monnier
2014-09-04 20:51   ` Achim Gratz
2014-09-05  7:03   ` Eli Zaretskii
2014-09-05  7:19     ` Eli Zaretskii
2014-09-05 18:39   ` Achim Gratz
2014-09-07  3:24     ` Daniel Colascione
2014-09-07 15:17       ` Eli Zaretskii
2014-09-08  1:04         ` Daniel Colascione
2014-09-08  2:42           ` Eli Zaretskii
2014-09-08  2:47             ` Daniel Colascione
2014-09-09 13:05               ` Eli Zaretskii
2014-09-09 13:45                 ` Stefan Monnier
2014-09-09 14:40                   ` Eli Zaretskii
2014-09-08  7:32       ` Achim Gratz
  -- strict thread matches above, loose matches on Subject: below --
2017-08-31 19:06 bug#28311: 25.2; Improve syntax highlighting in bat-mode Anders Lindgren
2017-08-31 19:27 ` Achim Gratz
2017-09-22 13:43   ` Eli Zaretskii
2017-09-22 17:01     ` bug#18405: " Glenn Morris
2017-09-22 19:04       ` Anders Lindgren
2017-09-22 19:14         ` Eli Zaretskii
2017-09-23 12:50           ` Anders Lindgren
2017-09-23 13:09             ` Eli Zaretskii
2017-09-23 18:05               ` bug#18405: " Anders Lindgren
2017-09-23 18:17                 ` Eli Zaretskii
2022-04-24 13:24                   ` bug#18405: 24.3.93; bat-mode.el Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=87mwaf2pjx.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=18405@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.