Mercurial > hg > xemacs-beta
comparison lisp/ediff/ediff-ptch.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 | 2d532a89d707 |
comparison
equal
deleted
inserted
replaced
133:b27e67717092 | 134:34a5b81f86ba |
---|---|
23 | 23 |
24 | 24 |
25 ;;; Code: | 25 ;;; Code: |
26 | 26 |
27 (provide 'ediff-ptch) | 27 (provide 'ediff-ptch) |
28 | |
29 (defgroup ediff-ptch nil | |
30 "Ediff patch support" | |
31 :tag "Patch" | |
32 :prefix "ediff-" | |
33 :group 'ediff) | |
28 | 34 |
29 ;; compiler pacifier | 35 ;; compiler pacifier |
30 (defvar ediff-window-A) | 36 (defvar ediff-window-A) |
31 (defvar ediff-window-B) | 37 (defvar ediff-window-B) |
32 (defvar ediff-window-C) | 38 (defvar ediff-window-C) |
51 (if (memq system-type '(vax-vms axp-vms emx ms-dos windows-nt windows-95)) | 57 (if (memq system-type '(vax-vms axp-vms emx ms-dos windows-nt windows-95)) |
52 "_orig" ".orig") | 58 "_orig" ".orig") |
53 "Backup extension used by the patch program. | 59 "Backup extension used by the patch program. |
54 See also `ediff-backup-specs'.") | 60 See also `ediff-backup-specs'.") |
55 | 61 |
56 (defvar ediff-backup-specs (format "-b %s" ediff-backup-extension) | 62 (defcustom ediff-backup-specs (format "-b %s" ediff-backup-extension) |
57 "*Backup directives to pass to the patch program. | 63 "*Backup directives to pass to the patch program. |
58 Ediff requires that the old version of the file \(before applying the patch\) | 64 Ediff requires that the old version of the file \(before applying the patch\) |
59 is saved in a file named `the-patch-file.extension'. Usually `extension' is | 65 is saved in a file named `the-patch-file.extension'. Usually `extension' is |
60 `.orig', but this can be changed by the user and may depend on the system. | 66 `.orig', but this can be changed by the user and may depend on the system. |
61 Therefore, Ediff needs to know the backup extension used by the patch program. | 67 Therefore, Ediff needs to know the backup extension used by the patch program. |
65 \(usually `.orig'\). | 71 \(usually `.orig'\). |
66 | 72 |
67 Note that both `ediff-backup-extension' and `ediff-backup-specs' | 73 Note that both `ediff-backup-extension' and `ediff-backup-specs' |
68 must be properly set. If your patch program takes the option `-b', | 74 must be properly set. If your patch program takes the option `-b', |
69 but not `-b extension', the variable `ediff-backup-extension' must | 75 but not `-b extension', the variable `ediff-backup-extension' must |
70 still be set so Ediff will know which extension to use.") | 76 still be set so Ediff will know which extension to use." |
71 | 77 :type 'string |
72 | 78 :group 'ediff-ptch) |
73 (defvar ediff-patch-default-directory nil | 79 |
74 "*Default directory to look for patches.") | 80 |
75 | 81 (defcustom ediff-patch-default-directory nil |
76 (defvar ediff-context-diff-label-regexp | 82 "*Default directory to look for patches." |
83 :type '(choice (const nil) string) | |
84 :group 'ediff-ptch) | |
85 | |
86 (defcustom ediff-context-diff-label-regexp | |
77 (concat "\\(" ; context diff 2-liner | 87 (concat "\\(" ; context diff 2-liner |
78 "^\\*\\*\\* \\([^ \t]+\\)[^*]+[\t ]*\n--- \\([^ \t]+\\)" | 88 "^\\*\\*\\* \\([^ \t]+\\)[^*]+[\t ]*\n--- \\([^ \t]+\\)" |
79 "\\|" ; GNU unified format diff 2-liner | 89 "\\|" ; GNU unified format diff 2-liner |
80 "^--- \\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ \\([^ \t]+\\)" | 90 "^--- \\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ \\([^ \t]+\\)" |
81 "\\)") | 91 "\\)") |
82 "*Regexp matching filename 2-liners at the start of each context diff.") | 92 "*Regexp matching filename 2-liners at the start of each context diff." |
83 | 93 :type 'regexp |
84 (defvar ediff-patch-program "patch" | 94 :group 'ediff-ptch) |
95 | |
96 (defcustom ediff-patch-program "patch" | |
85 "*Name of the program that applies patches. | 97 "*Name of the program that applies patches. |
86 It is recommended to use GNU-compatible versions.") | 98 It is recommended to use GNU-compatible versions." |
87 (defvar ediff-patch-options "-f" | 99 :type 'string |
100 :group 'ediff-ptch) | |
101 (defcustom ediff-patch-options "-f" | |
88 "*Options to pass to ediff-patch-program. | 102 "*Options to pass to ediff-patch-program. |
89 | 103 |
90 Note: the `-b' option should be specified in `ediff-backup-specs'. | 104 Note: the `-b' option should be specified in `ediff-backup-specs'. |
91 | 105 |
92 It is recommended to pass the `-f' option to the patch program, so it won't ask | 106 It is recommended to pass the `-f' option to the patch program, so it won't ask |
93 questions. However, some implementations don't accept this option, in which | 107 questions. However, some implementations don't accept this option, in which |
94 case the default value for this variable should be changed.") | 108 case the default value for this variable should be changed." |
109 :type 'string | |
110 :group 'ediff-ptch) | |
95 | 111 |
96 ;; The buffer of the patch file. Local to control buffer. | 112 ;; The buffer of the patch file. Local to control buffer. |
97 (ediff-defvar-local ediff-patchbufer nil "") | 113 (ediff-defvar-local ediff-patchbufer nil "") |
98 | 114 |
99 ;; The buffer where patch displays its diagnostics. | 115 ;; The buffer where patch displays its diagnostics. |