branch: externals/idlwave commit ee5bebc815048503dea10c69be7856e17dddfce3 Author: JD Smith <jdtsm...@gmail.com> Commit: JD Smith <jdtsm...@gmail.com>
Handle skipping multiple commands on a line. --- idlwave.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/idlwave.el b/idlwave.el index ccb4fa39fa..70dd7568e6 100644 --- a/idlwave.el +++ b/idlwave.el @@ -2637,13 +2637,10 @@ If not in a statement just moves to end of line. Returns position." last-statement)) (defun idlwave-skip-multi-commands (&optional lim) - "Skip past multiple commands on a line (with `&')." + "Skip past multiple commands on a line (or multiple lines) (with `&')." (let ((save-point (point))) - (when (re-search-forward ".*&" lim t) - (goto-char (match-end 0)) - (if (idlwave-quoted) - (goto-char save-point) - (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) + (while (re-search-forward "[^&]*[^&]&" lim t)) + (if (idlwave-quoted) (goto-char save-point)) (point))) (defun idlwave-skip-label-or-case ()