Mercurial > hg > xemacs-beta
comparison lisp/ediff/ediff-diff.el @ 134:34a5b81f86ba r20-2b1
Import from CVS: tag r20-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:30:11 +0200 |
parents | 6a378aca36af |
children | 318232e2a3f0 |
comparison
equal
deleted
inserted
replaced
133:b27e67717092 | 134:34a5b81f86ba |
---|---|
37 )) | 37 )) |
38 ;; end pacifier | 38 ;; end pacifier |
39 | 39 |
40 (require 'ediff-init) | 40 (require 'ediff-init) |
41 | 41 |
42 | 42 (defgroup ediff-diff nil |
43 (defvar ediff-shell | 43 "Diff related utilities" |
44 :prefix "ediff-" | |
45 :group 'ediff) | |
46 | |
47 | |
48 (defcustom ediff-shell | |
44 (cond ((eq system-type 'emx) "cmd") ; OS/2 | 49 (cond ((eq system-type 'emx) "cmd") ; OS/2 |
45 ((memq system-type '(ms-dos windows-nt windows-95)) | 50 ((memq system-type '(ms-dos windows-nt windows-95)) |
46 shell-file-name) ; no standard name on MS-DOS | 51 shell-file-name) ; no standard name on MS-DOS |
47 ((memq system-type '(vax-vms axp-vms)) "*dcl*") ; VMS | 52 ((memq system-type '(vax-vms axp-vms)) "*dcl*") ; VMS |
48 (t "sh")) ; UNIX | 53 (t "sh")) ; UNIX |
49 "*The shell used to run diff and patch. If user's .profile or | 54 "*The shell used to run diff and patch. If user's .profile or |
50 .cshrc files are set up correctly, any shell will do. However, some people | 55 .cshrc files are set up correctly, any shell will do. However, some people |
51 set $prompt or other things incorrectly, which leads to undesirable output | 56 set $prompt or other things incorrectly, which leads to undesirable output |
52 messages. These may cause Ediff to fail. In such a case, set ediff-shell | 57 messages. These may cause Ediff to fail. In such a case, set ediff-shell |
53 to a shell that you are not using or, better, fix your shell's startup file.") | 58 to a shell that you are not using or, better, fix your shell's startup file." |
54 | 59 :type 'string |
55 | 60 :group 'ediff-diff) |
56 (defvar ediff-diff-program "diff" | 61 |
57 "*Program to use for generating the differential of the two files.") | 62 |
58 (defvar ediff-diff-options "" | 63 (defcustom ediff-diff-program "diff" |
64 "*Program to use for generating the differential of the two files." | |
65 :type 'string | |
66 :group 'ediff-diff) | |
67 (defcustom ediff-diff-options "" | |
59 "*Options to pass to `ediff-diff-program'. | 68 "*Options to pass to `ediff-diff-program'. |
60 If diff\(1\) is used as `ediff-diff-program', then the most useful options are | 69 If diff\(1\) is used as `ediff-diff-program', then the most useful options are |
61 `-w', to ignore space, and `-i', to ignore case of letters. | 70 `-w', to ignore space, and `-i', to ignore case of letters. |
62 At present, the option `-c' is ignored, since Ediff doesn't understand this | 71 At present, the option `-c' is ignored, since Ediff doesn't understand this |
63 type of output.") | 72 type of output." |
64 | 73 :type 'string |
65 (defvar ediff-custom-diff-program ediff-diff-program | 74 :group 'ediff-diff) |
75 | |
76 (defcustom ediff-custom-diff-program ediff-diff-program | |
66 "*Program to use for generating custom diff output for saving it in a file. | 77 "*Program to use for generating custom diff output for saving it in a file. |
67 This output is not used by Ediff internally.") | 78 This output is not used by Ediff internally." |
68 (defvar ediff-custom-diff-options "-c" | 79 :type 'string |
69 "*Options to pass to `ediff-custom-diff-program'.") | 80 :group 'ediff-diff) |
81 (defcustom ediff-custom-diff-options "-c" | |
82 "*Options to pass to `ediff-custom-diff-program'." | |
83 :type 'string | |
84 :group 'ediff-diff) | |
70 | 85 |
71 ;;; Support for diff3 | 86 ;;; Support for diff3 |
72 | 87 |
73 (defvar ediff-match-diff3-line "^====\\(.?\\)$" | 88 (defvar ediff-match-diff3-line "^====\\(.?\\)$" |
74 "Pattern to match lines produced by diff3 that describe differences.") | 89 "Pattern to match lines produced by diff3 that describe differences.") |
75 (defvar ediff-diff3-program "diff3" | 90 (defcustom ediff-diff3-program "diff3" |
76 "*Program to be used for three-way comparison. | 91 "*Program to be used for three-way comparison. |
77 Must produce output compatible with Unix's diff3 program.") | 92 Must produce output compatible with Unix's diff3 program." |
78 (defvar ediff-diff3-options "" | 93 :type 'string |
79 "*Options to pass to `ediff-diff3-program'.") | 94 :group 'ediff-diff) |
80 (defvar ediff-diff3-ok-lines-regexp | 95 (defcustom ediff-diff3-options "" |
96 "*Options to pass to `ediff-diff3-program'." | |
97 :type 'string | |
98 :group 'ediff-diff) | |
99 (defcustom ediff-diff3-ok-lines-regexp | |
81 "^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)" | 100 "^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)" |
82 "*Regexp that matches normal output lines from `ediff-diff3-program'. | 101 "*Regexp that matches normal output lines from `ediff-diff3-program'. |
83 Lines that do not match are assumed to be error messages.") | 102 Lines that do not match are assumed to be error messages." |
103 :type 'regexp | |
104 :group 'ediff-diff) | |
84 | 105 |
85 ;; keeps the status of the current diff in 3-way jobs. | 106 ;; keeps the status of the current diff in 3-way jobs. |
86 ;; the status can be =diff(A), =diff(B), or =diff(A+B) | 107 ;; the status can be =diff(A), =diff(B), or =diff(A+B) |
87 (ediff-defvar-local ediff-diff-status "" "") | 108 (ediff-defvar-local ediff-diff-status "" "") |
88 | 109 |