[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9438: grep regressions

From: Stefan Monnier
Subject: bug#9438: grep regressions
Date: Tue, 06 Sep 2011 21:22:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Unfortunately, I can't find a simpler way to fix it than this patch:

It doesn't look too terrible.

> +     ;; Calculate column positions (col . end-col) of first grep match on a 
> line
> +     ((lambda ()
> +     (when grep-highlight-matches
> +       (setq compilation-error-screen-columns nil)

Why set it here?  I know it used to be set similarly, but I think it
should be set once and for all in grep-mode instead.

> +       (save-excursion
> +         (let* ((beg (progn (goto-char (match-end 0)) (point)))

Why not

            (goto-char (match-end 0))
            (let* ((beg (point))

Or better yet:

         (let* ((beg (match-end 0))
                (end (save-excursion (goto-char beg) (line-end-position)))

-- Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]