/[emacs]/emacs/lisp/progmodes/grep.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/grep.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by eliz, Sat May 7 16:21:12 2005 UTC revision 1.37 by jurta, Sat Jun 18 12:56:14 2005 UTC
# Line 250  Notice that using \\[next-error] or \\[c Line 250  Notice that using \\[next-error] or \\[c
250    ;; rms: I removed the code to match parens around the line number    ;; rms: I removed the code to match parens around the line number
251    ;; because it causes confusion and so we will find out if anyone needs it.    ;; because it causes confusion and so we will find out if anyone needs it.
252    ;; It causes confusion with a file name that contains a number in parens.    ;; It causes confusion with a file name that contains a number in parens.
253    '(("^\\(.+?\\)[: \t]+\    '(("^\\(.+?\\)\\([: \t]\\)+\
254  \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\  \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
255  \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6))  \\(?:-\\(?:\\([0-9]+\\)\\4\\)?\\.?\\([0-9]+\\)?\\)?\\2"
256      ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"       1 (3 . 6) (5 . 7))
257       1 2      ("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\
258    \\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)"
259         2 3
260       ;; Calculate column positions (beg . end) of first grep match on a line       ;; Calculate column positions (beg . end) of first grep match on a line
261       ((lambda ()       ((lambda ()
262          (setq compilation-error-screen-columns nil)          (setq compilation-error-screen-columns nil)
263          (- (match-beginning 5) (match-end 3) 8))          (- (match-beginning 5) (match-end 1) 8))
264        .        .
265        (lambda () (- (match-end 5) (match-end 3) 8))))        (lambda () (- (match-end 5) (match-end 1) 8)))
266         nil 1)
267      ("^Binary file \\(.+\\) matches$" 1 nil nil 1))      ("^Binary file \\(.+\\) matches$" 1 nil nil 1))
268    "Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")    "Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")
269    
# Line 293  Notice that using \\[next-error] or \\[c Line 296  Notice that using \\[next-error] or \\[c
296        (1 compilation-warning-face)        (1 compilation-warning-face)
297        (2 compilation-line-face))        (2 compilation-line-face))
298       ;; Highlight grep matches and delete markers       ;; Highlight grep matches and delete markers
299       ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"       ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)"
300        ;; Refontification does not work after the markers have been        ;; Refontification does not work after the markers have been
301        ;; deleted.  So we use the font-lock-face property here as Font        ;; deleted.  So we use the font-lock-face property here as Font
302        ;; Lock does not clear that.        ;; Lock does not clear that.
# Line 517  temporarily highlight in visited source Line 520  temporarily highlight in visited source
520    (set (make-local-variable 'compilation-error-face)    (set (make-local-variable 'compilation-error-face)
521         grep-hit-face)         grep-hit-face)
522    (set (make-local-variable 'compilation-error-regexp-alist)    (set (make-local-variable 'compilation-error-regexp-alist)
523         grep-regexp-alist))         grep-regexp-alist)
524      ;; Set `font-lock-lines-before' to 0 to not refontify the previous
525      ;; line where grep markers may be already removed.
526      (set (make-local-variable 'font-lock-lines-before) 0))
527    
528  ;;;###autoload  ;;;###autoload
529  (defun grep-find (command-args)  (defun grep-find (command-args)

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26