diff options
| author | Stefan Monnier | 2000-08-16 20:20:43 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-08-16 20:20:43 +0000 |
| commit | ffb4b7a11d543b4d05eb998818e9d4fe06ae4fad (patch) | |
| tree | b670f3c86d9244cfb291af5a67963456ca75bf38 | |
| parent | 4d3a92281f7ae884a7b47900c4e899d6d7435f80 (diff) | |
| download | emacs-ffb4b7a11d543b4d05eb998818e9d4fe06ae4fad.tar.gz emacs-ffb4b7a11d543b4d05eb998818e9d4fe06ae4fad.zip | |
(grep): Provide a default set of files.
(next-error): Docstring fix.
(compilation-find-file): Avoid find-file (fails in a dedicated window).
| -rw-r--r-- | lisp/progmodes/compile.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0f192ee84e5..44556d8185f 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -597,7 +597,7 @@ or \\<compilation-minor-mode-map>\\[compile-goto-error] in the grep \ | |||
| 597 | output buffer, to go to the lines | 597 | output buffer, to go to the lines |
| 598 | where grep found matches. | 598 | where grep found matches. |
| 599 | 599 | ||
| 600 | This command uses a special history list for its arguments, so you can | 600 | This command uses a special history list for its COMMAND-ARGS, so you can |
| 601 | easily repeat a grep command. | 601 | easily repeat a grep command. |
| 602 | 602 | ||
| 603 | A prefix argument says to default the argument based upon the current | 603 | A prefix argument says to default the argument based upon the current |
| @@ -617,8 +617,11 @@ if that history list is empty)." | |||
| 617 | 'grep-tag-default)))) | 617 | 'grep-tag-default)))) |
| 618 | (setq grep-default (or (car grep-history) grep-command)) | 618 | (setq grep-default (or (car grep-history) grep-command)) |
| 619 | ;; Replace the thing matching for with that around cursor | 619 | ;; Replace the thing matching for with that around cursor |
| 620 | (if (string-match "[^ ]+\\s +\\(-[^ ]+\\s +\\)*\\(\"[^\"]+\"\\|[^ ]+\\)" grep-default) | 620 | (when (string-match "[^ ]+\\s +\\(-[^ ]+\\s +\\)*\\(\"[^\"]+\"\\|[^ ]+\\)\\(\\s-+\\S-+\\)?" grep-default) |
| 621 | (setq grep-default (replace-match tag-default t t | 621 | (unless (or (match-beginning 3) (not (stringp buffer-file-name))) |
| 622 | (setq grep-default (concat grep-default "*." | ||
| 623 | (file-name-extension buffer-file-name)))) | ||
| 624 | (setq grep-default (replace-match tag-default t t | ||
| 622 | grep-default 2))))) | 625 | grep-default 2))))) |
| 623 | (list (read-from-minibuffer "Run grep (like this): " | 626 | (list (read-from-minibuffer "Run grep (like this): " |
| 624 | (or grep-default grep-command) | 627 | (or grep-default grep-command) |
| @@ -1405,9 +1408,9 @@ other kinds of prefix arguments are ignored." | |||
| 1405 | If all the error messages parsed so far have been processed already, | 1408 | If all the error messages parsed so far have been processed already, |
| 1406 | the message buffer is checked for new ones. | 1409 | the message buffer is checked for new ones. |
| 1407 | 1410 | ||
| 1408 | A prefix arg specifies how many error messages to move; | 1411 | A prefix ARGP specifies how many error messages to move; |
| 1409 | negative means move back to previous error messages. | 1412 | negative means move back to previous error messages. |
| 1410 | Just C-u as a prefix means reparse the error message buffer | 1413 | Just \\[universal-argument] as a prefix means reparse the error message buffer |
| 1411 | and start at the first error. | 1414 | and start at the first error. |
| 1412 | 1415 | ||
| 1413 | \\[next-error] normally uses the most recently started compilation or | 1416 | \\[next-error] normally uses the most recently started compilation or |
| @@ -1647,8 +1650,8 @@ Selects a window with point at SOURCE, with another window displaying ERROR." | |||
| 1647 | 1650 | ||
| 1648 | (defun compilation-find-file (marker filename dir &rest formats) | 1651 | (defun compilation-find-file (marker filename dir &rest formats) |
| 1649 | "Find a buffer for file FILENAME. | 1652 | "Find a buffer for file FILENAME. |
| 1650 | Search the directories in compilation-search-path. | 1653 | Search the directories in `compilation-search-path'. |
| 1651 | A nil in compilation-search-path means to try the | 1654 | A nil in `compilation-search-path' means to try the |
| 1652 | current directory, which is passed in DIR. | 1655 | current directory, which is passed in DIR. |
| 1653 | If FILENAME is not found at all, ask the user where to find it. | 1656 | If FILENAME is not found at all, ask the user where to find it. |
| 1654 | Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." | 1657 | Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." |
| @@ -1670,7 +1673,7 @@ Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." | |||
| 1670 | (while (and fmts (null buffer)) | 1673 | (while (and fmts (null buffer)) |
| 1671 | (setq name (expand-file-name (format (car fmts) filename) thisdir) | 1674 | (setq name (expand-file-name (format (car fmts) filename) thisdir) |
| 1672 | buffer (and (file-exists-p name) | 1675 | buffer (and (file-exists-p name) |
| 1673 | (find-file name)) | 1676 | (find-file-noselect name)) |
| 1674 | fmts (cdr fmts))) | 1677 | fmts (cdr fmts))) |
| 1675 | (setq dirs (cdr dirs))) | 1678 | (setq dirs (cdr dirs))) |
| 1676 | (or buffer | 1679 | (or buffer |