emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/progmodes/grep.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/grep.el [emacs-unicode-2]
Date: Thu, 04 Nov 2004 04:05:38 -0500

Index: emacs/lisp/progmodes/grep.el
diff -c emacs/lisp/progmodes/grep.el:1.10.2.8 
emacs/lisp/progmodes/grep.el:1.10.2.9
*** emacs/lisp/progmodes/grep.el:1.10.2.8       Wed Sep 15 08:59:57 2004
--- emacs/lisp/progmodes/grep.el        Thu Nov  4 08:55:38 2004
***************
*** 1,7 ****
  ;;; grep.el --- run compiler as inferior of Emacs, parse error messages
  
! ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 02, 2004
! ;;  Free Software Foundation, Inc.
  
  ;; Author: Roland McGrath <address@hidden>
  ;; Maintainer: FSF
--- 1,7 ----
  ;;; grep.el --- run compiler as inferior of Emacs, parse error messages
  
! ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
! ;;   2001, 2002, 2004  Free Software Foundation, Inc.
  
  ;; Author: Roland McGrath <address@hidden>
  ;; Maintainer: FSF
***************
*** 252,272 ****
  \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6))
      
("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
       1 2
       ((lambda ()
          (setq compilation-error-screen-columns nil)
          (- (match-beginning 5) (match-end 3) 8))
        .
!       (lambda () (- (match-end 5) (match-end 3) 8)))
!      nil nil
!      (4 (list 'face nil 'invisible t 'intangible t))
!      (5 (list 'face compilation-column-face))
!      (6 (list 'face nil 'invisible t 'intangible t))
!      ;; highlight other matches on the same line
!      ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
!       nil nil
!       (1 (list 'face nil 'invisible t 'intangible t))
!       (2 (list 'face compilation-column-face) t)
!       (3 (list 'face nil 'invisible t 'intangible t))))
      ("^Binary file \\(.+\\) matches$" 1 nil nil 1))
    "Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")
  
--- 252,263 ----
  \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6))
      
("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
       1 2
+      ;; Calculate column positions (beg . end) of first grep match on a line
       ((lambda ()
          (setq compilation-error-screen-columns nil)
          (- (match-beginning 5) (match-end 3) 8))
        .
!       (lambda () (- (match-end 5) (match-end 3) 8))))
      ("^Binary file \\(.+\\) matches$" 1 nil nil 1))
    "Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")
  
***************
*** 294,300 ****
       ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*"
        (0 '(face nil message nil help-echo nil mouse-face nil) t)
        (1 compilation-warning-face)
!       (2 compilation-line-face)))
     "Additional things to highlight in grep output.
  This gets tacked on the end of the generated expressions.")
  
--- 285,300 ----
       ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*"
        (0 '(face nil message nil help-echo nil mouse-face nil) t)
        (1 compilation-warning-face)
!       (2 compilation-line-face))
!      ;; Highlight grep matches and delete markers
!      ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
!       (2 compilation-column-face)
!       ((lambda (p))
!        (progn
!        ;; Delete markers with `replace-match' because it updates
!        ;; the match-data, whereas `delete-region' would render it obsolete.
!        (replace-match "" t t nil 3)
!        (replace-match "" t t nil 1)))))
     "Additional things to highlight in grep output.
  This gets tacked on the end of the generated expressions.")
  
***************
*** 436,444 ****
  
  (defun grep-default-command ()
    (let ((tag-default
!        (funcall (or find-tag-default-function
!                     (get major-mode 'find-tag-default-function)
!                     'find-tag-default)))
        (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' 
\t\n]\\)+\\)")
        (grep-default (or (car grep-history) grep-command)))
      ;; Replace the thing matching for with that around cursor.
--- 436,446 ----
  
  (defun grep-default-command ()
    (let ((tag-default
!          (shell-quote-argument
!           (or (funcall (or find-tag-default-function
!                            (get major-mode 'find-tag-default-function)
!                            'find-tag-default))
!               "")))
        (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' 
\t\n]\\)+\\)")
        (grep-default (or (car grep-history) grep-command)))
      ;; Replace the thing matching for with that around cursor.
***************
*** 460,466 ****
                                              0 (match-beginning 2))
                                   " *."
                                   (file-name-extension buffer-file-name))))
!       (replace-match (or tag-default "") t t grep-default 1))))
  
  ;;;###autoload
  (defun grep (command-args &optional highlight-regexp)
--- 462,468 ----
                                              0 (match-beginning 2))
                                   " *."
                                   (file-name-extension buffer-file-name))))
!       (replace-match tag-default t t grep-default 1))))
  
  ;;;###autoload
  (defun grep (command-args &optional highlight-regexp)




reply via email to

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