Mercurial > emacs
comparison lisp/progmodes/grep.el @ 90197:b7da78284d4c
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-65
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 425-445)
- Remove "-face" suffix from gnus faces
- Update from CVS
- Remove "-face" suffix from MH-E faces
- Remove "-face" suffix from cc-mode faces
- Remove "-face" suffix from eshell faces
- Remove "-face" suffix from ediff faces
- Implement tty vertical-divider face
- Rename vertical-divider face to vertical-border
- Change escape-glyph color on dark backgrounds back to cyan
- Update reference to renamed Buffer-menu-buffer face
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 24 Jun 2005 01:59:52 +0000 |
parents | 62afea0771d8 7c3d537469b0 |
children | f9a65d7ebd29 |
comparison
equal
deleted
inserted
replaced
90196:82d495f87e7b | 90197:b7da78284d4c |
---|---|
248 ;;;###autoload | 248 ;;;###autoload |
249 (defvar grep-regexp-alist | 249 (defvar grep-regexp-alist |
250 ;; rms: I removed the code to match parens around the line number | 250 ;; 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. | 251 ;; 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. | 252 ;; It causes confusion with a file name that contains a number in parens. |
253 '(("^\\(.+?\\)[: \t]+\ | 253 '(("^\\(.+?\\)\\([: \t]\\)+\ |
254 \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ | 254 \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ |
255 \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6)) | 255 \\(?:-\\(?:\\([0-9]+\\)\\4\\)?\\.?\\([0-9]+\\)?\\)?\\2" |
256 ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" | 256 1 (3 . 6) (5 . 7)) |
257 1 2 | 257 ("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\ |
258 \\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)" | |
259 2 3 | |
258 ;; Calculate column positions (beg . end) of first grep match on a line | 260 ;; Calculate column positions (beg . end) of first grep match on a line |
259 ((lambda () | 261 ((lambda () |
260 (setq compilation-error-screen-columns nil) | 262 (setq compilation-error-screen-columns nil) |
261 (- (match-beginning 5) (match-end 3) 8)) | 263 (- (match-beginning 5) (match-end 1) 8)) |
262 . | 264 . |
263 (lambda () (- (match-end 5) (match-end 3) 8)))) | 265 (lambda () (- (match-end 5) (match-end 1) 8))) |
266 nil 1) | |
264 ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) | 267 ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) |
265 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") | 268 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") |
266 | 269 |
267 (defvar grep-error "grep hit" | 270 (defvar grep-error "grep hit" |
268 "Message to print when no matches are found.") | 271 "Message to print when no matches are found.") |
291 ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" | 294 ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" |
292 (0 '(face nil message nil help-echo nil mouse-face nil) t) | 295 (0 '(face nil message nil help-echo nil mouse-face nil) t) |
293 (1 compilation-warning-face) | 296 (1 compilation-warning-face) |
294 (2 compilation-line-face)) | 297 (2 compilation-line-face)) |
295 ;; Highlight grep matches and delete markers | 298 ;; Highlight grep matches and delete markers |
296 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" | 299 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(?:\033\\[K\\)?\\)" |
297 ;; Refontification does not work after the markers have been | 300 ;; Refontification does not work after the markers have been |
298 ;; deleted. So we use the font-lock-face property here as Font | 301 ;; deleted. So we use the font-lock-face property here as Font |
299 ;; Lock does not clear that. | 302 ;; Lock does not clear that. |
300 (2 (list 'face nil 'font-lock-face grep-match-face)) | 303 (2 (list 'face nil 'font-lock-face grep-match-face)) |
301 ((lambda (p)) | 304 ((lambda (p)) |
515 "Sets `grep-last-buffer' and `compilation-window-height'." | 518 "Sets `grep-last-buffer' and `compilation-window-height'." |
516 (setq grep-last-buffer (current-buffer)) | 519 (setq grep-last-buffer (current-buffer)) |
517 (set (make-local-variable 'compilation-error-face) | 520 (set (make-local-variable 'compilation-error-face) |
518 grep-hit-face) | 521 grep-hit-face) |
519 (set (make-local-variable 'compilation-error-regexp-alist) | 522 (set (make-local-variable 'compilation-error-regexp-alist) |
520 grep-regexp-alist)) | 523 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)) | |
521 | 527 |
522 ;;;###autoload | 528 ;;;###autoload |
523 (defun grep-find (command-args) | 529 (defun grep-find (command-args) |
524 "Run grep via find, with user-specified args COMMAND-ARGS. | 530 "Run grep via find, with user-specified args COMMAND-ARGS. |
525 Collect output in a buffer. | 531 Collect output in a buffer. |