[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select dca8b75 087/218: Support variable-unqu
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select dca8b75 087/218: Support variable-unquoting syntax in bat-mode |
Date: |
Fri, 14 Dec 2018 03:35:07 -0500 (EST) |
branch: feature/gnus-select
commit dca8b75f7489b594c831aa86cda8c196c99c1073
Author: Eli Zaretskii <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Support variable-unquoting syntax in bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Fontify
argument numbers in %~n. Suggested by Jostein Kjønigsen
<address@hidden> in emacs-devel.
* test/lisp/progmodes/bat-mode-tests.el
(bat-test-fontification-iter-var-1): Update the test to check also
the %~n construct.
---
lisp/progmodes/bat-mode.el | 2 ++
test/lisp/progmodes/bat-mode-tests.el | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el
index 2910a7a..51acc6a 100644
--- a/lisp/progmodes/bat-mode.el
+++ b/lisp/progmodes/bat-mode.el
@@ -84,6 +84,8 @@
. 'bat-label-face)
("\\_<\\(defined\\|set\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)"
(2 font-lock-variable-name-face))
+ ("%~\\([0-9]\\)"
+ (1 font-lock-variable-name-face))
("%\\([^%~ \n]+\\)%?"
(1 font-lock-variable-name-face))
("!\\([^!%~ \n]+\\)!?" ; delayed-expansion !variable!
diff --git a/test/lisp/progmodes/bat-mode-tests.el
b/test/lisp/progmodes/bat-mode-tests.el
index 4fa8de1..5b82484 100644
--- a/test/lisp/progmodes/bat-mode-tests.el
+++ b/test/lisp/progmodes/bat-mode-tests.el
@@ -63,10 +63,11 @@
"Test fontification of iteration variables."
(should
(equal
- (bat-test-fontify "echo %%a\necho %%~dp1\necho %%~$PATH:I")
+ (bat-test-fontify "echo %%a\necho %%~dp1\necho %%~$PATH:I\necho %%~1")
"<span class=\"builtin\">echo</span> %%<span
class=\"variable-name\">a</span>
<span class=\"builtin\">echo</span> %%~dp<span class=\"variable-name\">1</span>
-<span class=\"builtin\">echo</span> %%~$<span
class=\"variable-name\">PATH</span>:<span class=\"variable-name\">I</span>")))
+<span class=\"builtin\">echo</span> %%~$<span
class=\"variable-name\">PATH</span>:<span class=\"variable-name\">I</span>
+<span class=\"builtin\">echo</span> %%~<span
class=\"variable-name\">1</span>")))
(defun bat-test-fill-paragraph (str)
"Return the result of invoking `fill-paragraph' on STR in a `bat-mode'
buffer."
- [Emacs-diffs] feature/gnus-select ecb867a 027/218: Replace uses of the obsolete local-write-file-hooks, (continued)
- [Emacs-diffs] feature/gnus-select ecb867a 027/218: Replace uses of the obsolete local-write-file-hooks, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 9be7eb4 034/218: Quieten --without-json compilation of json-tests.el, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 496ccae 036/218: * Makefile.in (check-declare): Also check test/ directory., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e16a1e7 028/218: Replace the obsolete process-kill-without-query in documentation, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 672b68c 043/218: Let warning about (:foo) be suppressible (Bug#30499), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select f3b9db1 038/218: Improve support for desktop restoration in daemon mode, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b8c0e0c 045/218: Fix create_process bug breaking eudc-expand-inline, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 77705ff 046/218: eshell-eval-using-options: Avoid compiler warning differently, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 97e6ea5 033/218: * test/lisp/vc/vc-tests.el (w32-application-type): Fix declaration., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 8ea5938 083/218: Minor copyedits in mule.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select dca8b75 087/218: Support variable-unquoting syntax in bat-mode,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 5224b57 106/218: In frameset save pixel values with frame-resize-pixelwise non-nil (Bug#30141), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 23fb252 097/218: Optimize "make check" and "make check-maybe", Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 537ed97 114/218: Pass json-readtable-error data as a list (bug#30489), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a684aeb 109/218: Add URL handler for file-name-directory (Bug#30444), Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 73f9e1d 125/218: * doc/emacs/rmail.texi: Fix broken link., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 82efded 096/218: Call enchant-lsmod correctly when Enchant is installed with a suffix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select bda66bd 132/218: Improve port to NetBSD tzalloc, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select aa2ebec 141/218: Extend Tramp's UTF8 tests, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b2b31ae 134/218: ; Spelling fix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 59a41b8 107/218: Optimize tramp-tests.el, Andrew G Cohen, 2018/12/14