From: Stefan Bund Date: Tue, 13 Sep 2011 09:05:48 +0000 (+0200) Subject: fix predicate point position X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=ec7437853bb4e99737e49388539e58a6f2992123;p=emacs-egrep.git fix predicate point position --- diff --git a/egrep.el b/egrep.el index b143979..0b943a0 100644 --- a/egrep.el +++ b/egrep.el @@ -6,7 +6,8 @@ (save-excursion (goto-char (point-min)) (while (re-search-forward regexp nil t) - (if (or (not predicate) (apply predicate args)) + (if (or (not predicate) (save-excursion (goto-char (match-beginning 0)) + (apply predicate args))) (let ((line (count-lines (point-min) (point))) (column (current-column)) (text (buffer-substring (save-excursion (beginning-of-line) (point))