From: Stefan Bund Date: Tue, 13 Sep 2011 11:15:14 +0000 (+0200) Subject: only one match per line X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=acc47d6553c4118c9be20fe606b9deb8c9622202;p=emacs-egrep.git only one match per line --- diff --git a/egrep.el b/egrep.el index 8096b57..1bab9fe 100644 --- a/egrep.el +++ b/egrep.el @@ -12,11 +12,13 @@ (column (current-column)) (text (buffer-substring (save-excursion (beginning-of-line) (point)) (save-excursion (end-of-line) (point))))) - (with-current-buffer result-buffer - (let ((inhibit-read-only t)) - (insert (format "%s:%d:%d: %s\n" - (dired-make-relative file-name default-directory) - line column text)))))))))) + (with-current-buffer result-buffer + (let ((inhibit-read-only t)) + (insert (format "%s:%d:%d: %s\n" + (dired-make-relative file-name default-directory) + line column text)))) + ; only one match / line + (forward-line 1))))))) (defun egrep-prepare-result-buffer () (let ((result-buffer (get-buffer-create "*egrep*")))