From: Daniel Pfeiffer Date: Wed, 23 Jun 2004 23:11:23 +0000 (+0000) Subject: (grep-error-screen-columns): New variable. X-Git-Tag: ttn-vms-21-2-B4~5653 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb72b9d0b5248404a55b599d99c0be5454704e4a;p=emacs.git (grep-error-screen-columns): New variable. (grep-regexp-alist): Give it the full functionality of gnu style compilation messages with line and column ranges. Ask me for the perl script I'm working on, that uses these. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 61ab77e7e88..4b7eb38c208 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-06-24 Daniel Pfeiffer + + * progmodes/grep.el (grep-error-screen-columns): New variable. + (grep-regexp-alist): Give it the full functionality of gnu style + compilation messages with line and column ranges. Ask me for the + perl script I'm working on, that uses these. + 2004-06-23 Nick Roberts * comint.el: (comint-insert-clicked-input, comint-copy-old-input): diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index aa9a50a2580..1916bde9ea1 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -146,6 +146,14 @@ The following place holders should be present in the string: :type 'boolean :group 'grep) +(defcustom grep-error-screen-columns nil + "*If non-nil, column numbers in grep hits are screen columns. +See `compilation-error-screen-columns'" + :type '(choice (const :tag "Default" nil) + integer) + :version "21.4" + :group 'grep) + ;;;###autoload (defcustom grep-setup-hook nil "List of hook functions run by `grep-process-setup' (see `run-hooks')." @@ -216,7 +224,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies `complation-last-buffer' rather than `grep-last-buffer'.") (defvar grep-regexp-alist - '(("^\\(.+?\\)[:( \t]+\\([0-9]+\\)\\([:) \t]\\)\\(?:\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?\\3\\)?" 1 2 (4 . 5)) + '(("^\\(.+?\\)[:( \t]+\ +\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ +\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6)) ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) "Regexp used to match grep hits. See `compilation-error-regexp-alist'.")