aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-08-23 23:08:26 +0200
committerTeddy Wing2021-08-23 23:13:18 +0200
commit732c469b3b329eeddcf0d72575c5d7bff1f9e278 (patch)
treea8d7042987ba6974fe277b80cdc5b4fffdea55d8
parentc25e99c1c795450c0f792fdadbff37d3de078099 (diff)
downloadreadline-incdec-732c469b3b329eeddcf0d72575c5d7bff1f9e278.tar.bz2
Highlight `incdec.m4` as a Bash file
When I changed the file to an M4 file, it removed Bash syntax highlighting, and the `include()` call interfered with Bash quote matching. Use a different macro to include the Perl file so we can get Bash syntax highlighting.
-rw-r--r--Makefile4
-rw-r--r--incdec.m4.bash (renamed from incdec.m4)2
2 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2babb4a..f23d724 100644
--- a/Makefile
+++ b/Makefile
@@ -8,5 +8,5 @@ incdec.pl: incdec.pl.m4 incdec.pm
m4 $< > $@
rm incdec.sub.pl
-incdec: incdec.m4 incdec.pl
- m4 $< > $@
+incdec: incdec.m4.bash incdec.pl
+ m4 $< --define="INCLUDE_INCDEC_PL=include(\`incdec.pl')dnl" > $@
diff --git a/incdec.m4 b/incdec.m4.bash
index 0398a56..17fd762 100644
--- a/incdec.m4
+++ b/incdec.m4.bash
@@ -57,7 +57,7 @@ function __readline_incdec {
# print "$line, ${"increment-by"}, ${"point-position"}, $backward";
line=$(perl -s -e '
-include(`incdec.pl')dnl
+INCLUDE_INCDEC_PL
' \
-- \
-line="$READLINE_LINE" \