aboutsummaryrefslogtreecommitdiffstats
path: root/incdec.m4.pl
AgeCommit message (Collapse)Author
2021-08-28incdec.bash: Set up point moving after start positionTeddy Wing
This doesn't work yet as it turns out it requires a change to the `incdec()` Perl subroutine. We want to move point when switching between positive and negative numbers (adding or removing a hypen negative sign), but only if point is on or after the start of the number being incremented. If point is before that, it looks like it's moving. Read the start index from the `incdec()` subroutine and prefix it to the output line in the format: "${start_position}#${output_line}". We can then use the "#" to split the two values and extract them in the Bash functions. Needed to move setting `$READLINE_LINE` to the increment and decrement Bash functions because I now run `__readline_incdec` in a subshell, meaning the current line can't be manipulated with that variable in that function. In the increment and decrement Bash functions, we now check if the start position of the incremented number is less than or equal to `$READLINE_POINT` before trying to move point.
2021-08-28incdec.pm: Return both line and start positionTeddy Wing
I want access to the start position of the number being operated on. This will allow me to determine if point should be moved or not. Refactor everything to accept an array from `incdec()`.
2021-08-24Rename `incdec.pl.m4` to `incdec.m4.pl`Teddy Wing
Like we did for the `incdec.m4` Bash include, rename the Perl M4 file to give it a `.pl` extension so we get Perl syntax highlighting. Similarly define an include macro so quoting doesn't mess up highlighting.