diff options
| author | Karoly Lorentey | 2004-09-10 13:06:10 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-09-10 13:06:10 +0000 |
| commit | fd15a4daca3b32487b751006a5e7be7732fdf9ea (patch) | |
| tree | b53e804e340b981462b1cba73be9a1ccd8667f0e /lisp/progmodes | |
| parent | d8d26438090eae0b8f518ad740ab4b821efdf540 (diff) | |
| parent | cbd5542a3ccf044c601318f288d9b022f53b1de2 (diff) | |
| download | emacs-fd15a4daca3b32487b751006a5e7be7732fdf9ea.tar.gz emacs-fd15a4daca3b32487b751006a5e7be7732fdf9ea.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-529
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-530
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-531
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-532
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-533
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-535
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-536
sync-tree with gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--devo--0--patch-2
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.8--base-0
Import from Gnus CVS branch V5-8
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-1
{arch}/=tagging-method: Add CVS and autoconf grot to junk regexp
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-2
Use explicit tags for autoconf input files
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-3
Remove RCS keywords
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-4
Fix copied explicit id-tags
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-5
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-6
configure.in: Use ifelse instead of m4_if for arch-tag: comment
* miles@gnu.org--gnu-2004/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2004/gnus--rel--5.8--base-0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-1
Gnus 5.10, from CVS branch v5-10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-2
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-3
Use explicit tags for autoconf input files
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-4
sync-tree with gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-5
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-6
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-7
Remove RCS keywords
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-8
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-9
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-10
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-11
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-12
Update from CVS: make.bat: Fix line endings around arch-tag.
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-13
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-14
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-15
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-16
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-17
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-242
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/compile.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 36 |
2 files changed, 28 insertions, 12 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 076ffcc8159..8ae2a7abe76 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -878,7 +878,7 @@ Returns the compilation buffer created." | |||
| 878 | ;; Set the EMACS variable, but | 878 | ;; Set the EMACS variable, but |
| 879 | ;; don't override users' setting of $EMACS. | 879 | ;; don't override users' setting of $EMACS. |
| 880 | (unless (getenv "EMACS") '("EMACS=t")) | 880 | (unless (getenv "EMACS") '("EMACS=t")) |
| 881 | process-environment)) | 881 | (copy-sequence process-environment))) |
| 882 | (thisdir default-directory) | 882 | (thisdir default-directory) |
| 883 | outwin outbuf) | 883 | outwin outbuf) |
| 884 | (with-current-buffer | 884 | (with-current-buffer |
| @@ -1059,7 +1059,7 @@ exited abnormally with code %d\n" | |||
| 1059 | (set-keymap-parent map compilation-minor-mode-map) | 1059 | (set-keymap-parent map compilation-minor-mode-map) |
| 1060 | (define-key map " " 'scroll-up) | 1060 | (define-key map " " 'scroll-up) |
| 1061 | (define-key map "\^?" 'scroll-down) | 1061 | (define-key map "\^?" 'scroll-down) |
| 1062 | (define-key map "\C-c\C-f" 'next-error-follow-mode) | 1062 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) |
| 1063 | 1063 | ||
| 1064 | ;; Set up the menu-bar | 1064 | ;; Set up the menu-bar |
| 1065 | (define-key map [menu-bar compilation] | 1065 | (define-key map [menu-bar compilation] |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index e4cd0c59dac..4d9e05109a8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -64,8 +64,8 @@ will be parsed and highlighted as soon as you try to move to them." | |||
| 64 | :version "21.4" | 64 | :version "21.4" |
| 65 | :group 'grep) | 65 | :group 'grep) |
| 66 | 66 | ||
| 67 | (defcustom grep-highlight-matches t | 67 | (defcustom grep-highlight-matches 'auto-detect |
| 68 | "*Non-nil to use special markers to highlight grep matches. | 68 | "If t, use special markers to highlight grep matches. |
| 69 | 69 | ||
| 70 | Some grep programs are able to surround matches with special | 70 | Some grep programs are able to surround matches with special |
| 71 | markers in grep output. Such markers can be used to highlight | 71 | markers in grep output. Such markers can be used to highlight |
| @@ -74,8 +74,13 @@ matches in grep mode. | |||
| 74 | This option sets the environment variable GREP_COLOR to specify | 74 | This option sets the environment variable GREP_COLOR to specify |
| 75 | markers for highlighting and GREP_OPTIONS to add the --color | 75 | markers for highlighting and GREP_OPTIONS to add the --color |
| 76 | option in front of any explicit grep options before starting | 76 | option in front of any explicit grep options before starting |
| 77 | the grep." | 77 | the grep. |
| 78 | :type 'boolean | 78 | |
| 79 | The default value of this variable is set up by `grep-compute-defaults'; | ||
| 80 | call that function before using this variable in your program." | ||
| 81 | :type '(choice (const :tag "Do not highlight matches with grep markers" nil) | ||
| 82 | (const :tag "Highlight matches with grep markers" t) | ||
| 83 | (other :tag "Not Set" auto-detect)) | ||
| 79 | :version "21.4" | 84 | :version "21.4" |
| 80 | :group 'grep) | 85 | :group 'grep) |
| 81 | 86 | ||
| @@ -110,7 +115,6 @@ necessary if the grep program used supports the `-H' option. | |||
| 110 | 115 | ||
| 111 | The default value of this variable is set up by `grep-compute-defaults'; | 116 | The default value of this variable is set up by `grep-compute-defaults'; |
| 112 | call that function before using this variable in your program." | 117 | call that function before using this variable in your program." |
| 113 | :type 'boolean | ||
| 114 | :type '(choice (const :tag "Do Not Append Null Device" nil) | 118 | :type '(choice (const :tag "Do Not Append Null Device" nil) |
| 115 | (const :tag "Append Null Device" t) | 119 | (const :tag "Append Null Device" t) |
| 116 | (other :tag "Not Set" auto-detect)) | 120 | (other :tag "Not Set" auto-detect)) |
| @@ -181,7 +185,7 @@ See `compilation-error-screen-columns'" | |||
| 181 | (let ((map (cons 'keymap compilation-minor-mode-map))) | 185 | (let ((map (cons 'keymap compilation-minor-mode-map))) |
| 182 | (define-key map " " 'scroll-up) | 186 | (define-key map " " 'scroll-up) |
| 183 | (define-key map "\^?" 'scroll-down) | 187 | (define-key map "\^?" 'scroll-down) |
| 184 | (define-key map "\C-c\C-f" 'next-error-follow-mode) | 188 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) |
| 185 | 189 | ||
| 186 | ;; This is intolerable -- rms | 190 | ;; This is intolerable -- rms |
| 187 | ;;; (define-key map [remap next-line] 'compilation-next-error) | 191 | ;;; (define-key map [remap next-line] 'compilation-next-error) |
| @@ -333,7 +337,9 @@ This variable's value takes effect when `grep-compute-defaults' is called.") | |||
| 333 | (defun grep-process-setup () | 337 | (defun grep-process-setup () |
| 334 | "Setup compilation variables and buffer for `grep'. | 338 | "Setup compilation variables and buffer for `grep'. |
| 335 | Set up `compilation-exit-message-function' and run `grep-setup-hook'." | 339 | Set up `compilation-exit-message-function' and run `grep-setup-hook'." |
| 336 | (when grep-highlight-matches | 340 | (unless (or (not grep-highlight-matches) (eq grep-highlight-matches t)) |
| 341 | (grep-compute-defaults)) | ||
| 342 | (when (eq grep-highlight-matches t) | ||
| 337 | ;; Modify `process-environment' locally bound in `compilation-start' | 343 | ;; Modify `process-environment' locally bound in `compilation-start' |
| 338 | (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always")) | 344 | (setenv "GREP_OPTIONS" (concat (getenv "GREP_OPTIONS") " --color=always")) |
| 339 | (setenv "GREP_COLOR" "01;41")) | 345 | (setenv "GREP_COLOR" "01;41")) |
| @@ -415,7 +421,18 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 415 | (format "%s <D> <X> -type f <F> -print | xargs %s <R>" | 421 | (format "%s <D> <X> -type f <F> -print | xargs %s <R>" |
| 416 | find-program gcmd)) | 422 | find-program gcmd)) |
| 417 | (t (format "%s <D> <X> -type f <F> -exec %s <R> {} %s \\;" | 423 | (t (format "%s <D> <X> -type f <F> -exec %s <R> {} %s \\;" |
| 418 | find-program gcmd null-device))))))) | 424 | find-program gcmd null-device)))))) |
| 425 | (unless (or (not grep-highlight-matches) (eq grep-highlight-matches t)) | ||
| 426 | (setq grep-highlight-matches | ||
| 427 | (with-temp-buffer | ||
| 428 | (and (equal (condition-case nil | ||
| 429 | (call-process grep-program nil t nil "--help") | ||
| 430 | (error nil)) | ||
| 431 | 0) | ||
| 432 | (progn | ||
| 433 | (goto-char (point-min)) | ||
| 434 | (search-forward "--color" nil t)) | ||
| 435 | t))))) | ||
| 419 | 436 | ||
| 420 | (defun grep-default-command () | 437 | (defun grep-default-command () |
| 421 | (let ((tag-default | 438 | (let ((tag-default |
| @@ -483,7 +500,6 @@ temporarily highlight in visited source lines." | |||
| 483 | command-args) | 500 | command-args) |
| 484 | 'grep-mode nil highlight-regexp))) | 501 | 'grep-mode nil highlight-regexp))) |
| 485 | 502 | ||
| 486 | ;;;###autoload (autoload 'grep-mode "grep" nil t) | ||
| 487 | (define-compilation-mode grep-mode "Grep" | 503 | (define-compilation-mode grep-mode "Grep" |
| 488 | "Sets `grep-last-buffer' and `compilation-window-height'." | 504 | "Sets `grep-last-buffer' and `compilation-window-height'." |
| 489 | (setq grep-last-buffer (current-buffer)) | 505 | (setq grep-last-buffer (current-buffer)) |
| @@ -599,5 +615,5 @@ those sub directories of DIR." | |||
| 599 | 615 | ||
| 600 | (provide 'grep) | 616 | (provide 'grep) |
| 601 | 617 | ||
| 602 | ;;; arch-tag: 5a5b9169-a79d-4f38-9c38-f69615f39c4d | 618 | ;; arch-tag: 5a5b9169-a79d-4f38-9c38-f69615f39c4d |
| 603 | ;;; grep.el ends here | 619 | ;;; grep.el ends here |