From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.bugs Subject: bug#18405: 24.3.93; bat-mode.el Date: Thu, 04 Sep 2014 20:44:50 +0200 Message-ID: <87mwaf2pjx.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409856388 15586 80.91.229.3 (4 Sep 2014 18:46:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Sep 2014 18:46:28 +0000 (UTC) To: 18405@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 04 20:46:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XPc33-0002dp-9n for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Sep 2014 20:46:21 +0200 Original-Received: from localhost ([::1]:53643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPc32-0004n6-Ji for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Sep 2014 14:46:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPc2t-0004h9-KJ for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:46:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPc2l-0003Bb-88 for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:46:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPc2l-0003BW-65 for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XPc2k-0000dE-NK for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Achim Gratz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Sep 2014 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18405 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14098563282368 (code B ref -1); Thu, 04 Sep 2014 18:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Sep 2014 18:45:28 +0000 Original-Received: from localhost ([127.0.0.1]:59014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPc2B-0000c6-Us for submit@debbugs.gnu.org; Thu, 04 Sep 2014 14:45:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33177) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPc28-0000bn-SW for submit@debbugs.gnu.org; Thu, 04 Sep 2014 14:45:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPc1x-00032r-8s for submit@debbugs.gnu.org; Thu, 04 Sep 2014 14:45:19 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPc1x-00032l-6c for submit@debbugs.gnu.org; Thu, 04 Sep 2014 14:45:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPc1r-0003wo-5D for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPc1k-0002jB-PT for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:45:07 -0400 Original-Received: from mail-in-08.arcor-online.net ([151.189.21.48]:38388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPc1k-0002if-G7 for bug-gnu-emacs@gnu.org; Thu, 04 Sep 2014 14:45:00 -0400 Original-Received: from mail-in-20-z2.arcor-online.net (mail-in-20-z2.arcor-online.net [151.189.8.85]) by mx.arcor.de (Postfix) with ESMTP id 69F593AEAD1 for ; Thu, 4 Sep 2014 20:44:58 +0200 (CEST) Original-Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-20-z2.arcor-online.net (Postfix) with ESMTP id 6364B834074 for ; Thu, 4 Sep 2014 20:44:58 +0200 (CEST) X-Greylist: Passed host: 217.235.38.37 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-03.arcor-online.net 4D7CAD80D3 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nexgo.de; s=mail-in; t=1409856298; bh=zLwuNNhyPrbQ+cI4J/e2viutBwEXI2uMfh5Y8RA2918=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=NXIeScAhdiHstCw3+PbZ9S8ck7KCjflwokfNwyVJo92heq3V8DPtbrosddfIV2UvD JDR/dV0TXR7/6ndz8Lp/zP2naPSaC7/kZ0ICOuzdoQS0iePZb5+cmYA0RiRPWAUFue jxkp/Fynngmz5Ksmp0C4yks0lUni2gbx4BFxRVVs= Original-Received: from Rainer.invalid (pD9EB2625.dip0.t-ipconnect.de [217.235.38.37]) (Authenticated sender: stromeko@arcor.de) by mail-in-03.arcor-online.net (Postfix) with ESMTPSA id 4D7CAD80D3 for ; Thu, 4 Sep 2014 20:44:58 +0200 (CEST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93035 Archived-At: 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