diff options
| author | Philipp Stephani | 2017-09-23 20:43:44 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-11-05 18:53:25 +0100 |
| commit | 72d07d1950a88f9f08d8ad5f45cdf0f3353e1500 (patch) | |
| tree | b3fa69f7042f51e07cf96425191175cafeaf9f26 | |
| parent | 18af404ef33d8efcbb9446945e543251ab33aa3c (diff) | |
| download | emacs-72d07d1950a88f9f08d8ad5f45cdf0f3353e1500.tar.gz emacs-72d07d1950a88f9f08d8ad5f45cdf0f3353e1500.zip | |
Ediff: add some missing documentation
* vc/ediff.el (ediff-files, ediff-files3, ediff-buffers)
(ediff-buffers3, ediff-merge-directories)
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-windows-wordwise, ediff-windows-linewise)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-merge-files, ediff-merge-files-with-ancestor)
(ediff-merge-buffers, ediff-merge-buffers-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-patch-file, ediff-revision): Document missing arguments.
(ediff-patch-buffer, ediff-revision): Add second space after
period.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command): Add
documentation for the command line functions.
| -rw-r--r-- | lisp/vc/ediff.el | 125 |
1 files changed, 100 insertions, 25 deletions
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index d0f8e63dcb1..0adf51328e2 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -185,7 +185,9 @@ | |||
| 185 | 185 | ||
| 186 | ;;;###autoload | 186 | ;;;###autoload |
| 187 | (defun ediff-files (file-A file-B &optional startup-hooks) | 187 | (defun ediff-files (file-A file-B &optional startup-hooks) |
| 188 | "Run Ediff on a pair of files, FILE-A and FILE-B." | 188 | "Run Ediff on a pair of files, FILE-A and FILE-B. |
| 189 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 190 | arguments after setting up the Ediff buffers." | ||
| 189 | (interactive | 191 | (interactive |
| 190 | (let ((dir-A (if ediff-use-last-dir | 192 | (let ((dir-A (if ediff-use-last-dir |
| 191 | ediff-last-dir-A | 193 | ediff-last-dir-A |
| @@ -221,7 +223,9 @@ | |||
| 221 | 223 | ||
| 222 | ;;;###autoload | 224 | ;;;###autoload |
| 223 | (defun ediff-files3 (file-A file-B file-C &optional startup-hooks) | 225 | (defun ediff-files3 (file-A file-B file-C &optional startup-hooks) |
| 224 | "Run Ediff on three files, FILE-A, FILE-B, and FILE-C." | 226 | "Run Ediff on three files, FILE-A, FILE-B, and FILE-C. |
| 227 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 228 | arguments after setting up the Ediff buffers." | ||
| 225 | (interactive | 229 | (interactive |
| 226 | (let ((dir-A (if ediff-use-last-dir | 230 | (let ((dir-A (if ediff-use-last-dir |
| 227 | ediff-last-dir-A | 231 | ediff-last-dir-A |
| @@ -419,7 +423,14 @@ If this file is a backup, `ediff' it with its original." | |||
| 419 | 423 | ||
| 420 | ;;;###autoload | 424 | ;;;###autoload |
| 421 | (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name) | 425 | (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name) |
| 422 | "Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B." | 426 | "Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B. |
| 427 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 428 | arguments after setting up the Ediff buffers. JOB-NAME is a | ||
| 429 | symbol describing the Ediff job type; it defaults to | ||
| 430 | `ediff-buffers', but can also be one of | ||
| 431 | `ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor', | ||
| 432 | `ediff-last-dir-C', `ediff-buffers3', `ediff-merge-buffers', or | ||
| 433 | `ediff-merge-buffers-with-ancestor'." | ||
| 423 | (interactive | 434 | (interactive |
| 424 | (let (bf) | 435 | (let (bf) |
| 425 | (list (setq bf (read-buffer "Buffer A to compare: " | 436 | (list (setq bf (read-buffer "Buffer A to compare: " |
| @@ -441,7 +452,14 @@ If this file is a backup, `ediff' it with its original." | |||
| 441 | ;;;###autoload | 452 | ;;;###autoload |
| 442 | (defun ediff-buffers3 (buffer-A buffer-B buffer-C | 453 | (defun ediff-buffers3 (buffer-A buffer-B buffer-C |
| 443 | &optional startup-hooks job-name) | 454 | &optional startup-hooks job-name) |
| 444 | "Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C." | 455 | "Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C. |
| 456 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 457 | arguments after setting up the Ediff buffers. JOB-NAME is a | ||
| 458 | symbol describing the Ediff job type; it defaults to | ||
| 459 | `ediff-buffers3', but can also be one of | ||
| 460 | `ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor', | ||
| 461 | `ediff-last-dir-C', `ediff-buffers', `ediff-merge-buffers', or | ||
| 462 | `ediff-merge-buffers-with-ancestor'." | ||
| 445 | (interactive | 463 | (interactive |
| 446 | (let (bf bff) | 464 | (let (bf bff) |
| 447 | (list (setq bf (read-buffer "Buffer A to compare: " | 465 | (list (setq bf (read-buffer "Buffer A to compare: " |
| @@ -637,7 +655,8 @@ regular expression; only file names that match the regexp are considered." | |||
| 637 | (defun ediff-merge-directories (dir1 dir2 regexp &optional merge-autostore-dir) | 655 | (defun ediff-merge-directories (dir1 dir2 regexp &optional merge-autostore-dir) |
| 638 | "Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have | 656 | "Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have |
| 639 | the same name in both. The third argument, REGEXP, is nil or a regular | 657 | the same name in both. The third argument, REGEXP, is nil or a regular |
| 640 | expression; only file names that match the regexp are considered." | 658 | expression; only file names that match the regexp are considered. |
| 659 | MERGE-AUTOSTORE-DIR is the directory in which to store merged files." | ||
| 641 | (interactive | 660 | (interactive |
| 642 | (let ((dir-A (ediff-get-default-directory-name)) | 661 | (let ((dir-A (ediff-get-default-directory-name)) |
| 643 | (default-regexp (eval ediff-default-filtering-regexp)) | 662 | (default-regexp (eval ediff-default-filtering-regexp)) |
| @@ -674,7 +693,8 @@ expression; only file names that match the regexp are considered." | |||
| 674 | Ediff merges files that have identical names in DIR1, DIR2. If a pair of files | 693 | Ediff merges files that have identical names in DIR1, DIR2. If a pair of files |
| 675 | in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge | 694 | in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge |
| 676 | without ancestor. The fourth argument, REGEXP, is nil or a regular expression; | 695 | without ancestor. The fourth argument, REGEXP, is nil or a regular expression; |
| 677 | only file names that match the regexp are considered." | 696 | only file names that match the regexp are considered. |
| 697 | MERGE-AUTOSTORE-DIR is the directory in which to store merged files." | ||
| 678 | (interactive | 698 | (interactive |
| 679 | (let ((dir-A (ediff-get-default-directory-name)) | 699 | (let ((dir-A (ediff-get-default-directory-name)) |
| 680 | (default-regexp (eval ediff-default-filtering-regexp)) | 700 | (default-regexp (eval ediff-default-filtering-regexp)) |
| @@ -710,7 +730,8 @@ only file names that match the regexp are considered." | |||
| 710 | &optional merge-autostore-dir) | 730 | &optional merge-autostore-dir) |
| 711 | "Run Ediff on a directory, DIR1, merging its files with their revisions. | 731 | "Run Ediff on a directory, DIR1, merging its files with their revisions. |
| 712 | The second argument, REGEXP, is a regular expression that filters the file | 732 | The second argument, REGEXP, is a regular expression that filters the file |
| 713 | names. Only the files that are under revision control are taken into account." | 733 | names. Only the files that are under revision control are taken into account. |
| 734 | MERGE-AUTOSTORE-DIR is the directory in which to store merged files." | ||
| 714 | (interactive | 735 | (interactive |
| 715 | (let ((dir-A (ediff-get-default-directory-name)) | 736 | (let ((dir-A (ediff-get-default-directory-name)) |
| 716 | (default-regexp (eval ediff-default-filtering-regexp)) | 737 | (default-regexp (eval ediff-default-filtering-regexp)) |
| @@ -740,7 +761,8 @@ names. Only the files that are under revision control are taken into account." | |||
| 740 | merge-autostore-dir) | 761 | merge-autostore-dir) |
| 741 | "Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. | 762 | "Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. |
| 742 | The second argument, REGEXP, is a regular expression that filters the file | 763 | The second argument, REGEXP, is a regular expression that filters the file |
| 743 | names. Only the files that are under revision control are taken into account." | 764 | names. Only the files that are under revision control are taken into account. |
| 765 | MERGE-AUTOSTORE-DIR is the directory in which to store merged files." | ||
| 744 | (interactive | 766 | (interactive |
| 745 | (let ((dir-A (ediff-get-default-directory-name)) | 767 | (let ((dir-A (ediff-get-default-directory-name)) |
| 746 | (default-regexp (eval ediff-default-filtering-regexp)) | 768 | (default-regexp (eval ediff-default-filtering-regexp)) |
| @@ -908,7 +930,9 @@ names. Only the files that are under revision control are taken into account." | |||
| 908 | With prefix argument, DUMB-MODE, or on a non-windowing display, works as | 930 | With prefix argument, DUMB-MODE, or on a non-windowing display, works as |
| 909 | follows: | 931 | follows: |
| 910 | If WIND-A is nil, use selected window. | 932 | If WIND-A is nil, use selected window. |
| 911 | If WIND-B is nil, use window next to WIND-A." | 933 | If WIND-B is nil, use window next to WIND-A. |
| 934 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 935 | arguments after setting up the Ediff buffers." | ||
| 912 | (interactive "P") | 936 | (interactive "P") |
| 913 | (ediff-windows dumb-mode wind-A wind-B | 937 | (ediff-windows dumb-mode wind-A wind-B |
| 914 | startup-hooks 'ediff-windows-wordwise 'word-mode)) | 938 | startup-hooks 'ediff-windows-wordwise 'word-mode)) |
| @@ -919,7 +943,9 @@ If WIND-B is nil, use window next to WIND-A." | |||
| 919 | With prefix argument, DUMB-MODE, or on a non-windowing display, works as | 943 | With prefix argument, DUMB-MODE, or on a non-windowing display, works as |
| 920 | follows: | 944 | follows: |
| 921 | If WIND-A is nil, use selected window. | 945 | If WIND-A is nil, use selected window. |
| 922 | If WIND-B is nil, use window next to WIND-A." | 946 | If WIND-B is nil, use window next to WIND-A. |
| 947 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 948 | arguments after setting up the Ediff buffers." | ||
| 923 | (interactive "P") | 949 | (interactive "P") |
| 924 | (ediff-windows dumb-mode wind-A wind-B | 950 | (ediff-windows dumb-mode wind-A wind-B |
| 925 | startup-hooks 'ediff-windows-linewise nil)) | 951 | startup-hooks 'ediff-windows-linewise nil)) |
| @@ -963,9 +989,12 @@ If WIND-B is nil, use window next to WIND-A." | |||
| 963 | ;;;###autoload | 989 | ;;;###autoload |
| 964 | (defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks) | 990 | (defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks) |
| 965 | "Run Ediff on a pair of regions in specified buffers. | 991 | "Run Ediff on a pair of regions in specified buffers. |
| 992 | BUFFER-A and BUFFER-B are the buffers to be compared. | ||
| 966 | Regions (i.e., point and mark) can be set in advance or marked interactively. | 993 | Regions (i.e., point and mark) can be set in advance or marked interactively. |
| 967 | This function is effective only for relatively small regions, up to 200 | 994 | This function is effective only for relatively small regions, up to 200 |
| 968 | lines. For large regions, use `ediff-regions-linewise'." | 995 | lines. For large regions, use `ediff-regions-linewise'. |
| 996 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 997 | arguments after setting up the Ediff buffers." | ||
| 969 | (interactive | 998 | (interactive |
| 970 | (let (bf) | 999 | (let (bf) |
| 971 | (list (setq bf (read-buffer "Region's A buffer: " | 1000 | (list (setq bf (read-buffer "Region's A buffer: " |
| @@ -1003,10 +1032,13 @@ lines. For large regions, use `ediff-regions-linewise'." | |||
| 1003 | ;;;###autoload | 1032 | ;;;###autoload |
| 1004 | (defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks) | 1033 | (defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks) |
| 1005 | "Run Ediff on a pair of regions in specified buffers. | 1034 | "Run Ediff on a pair of regions in specified buffers. |
| 1035 | BUFFER-A and BUFFER-B are the buffers to be compared. | ||
| 1006 | Regions (i.e., point and mark) can be set in advance or marked interactively. | 1036 | Regions (i.e., point and mark) can be set in advance or marked interactively. |
| 1007 | Each region is enlarged to contain full lines. | 1037 | Each region is enlarged to contain full lines. |
| 1008 | This function is effective for large regions, over 100-200 | 1038 | This function is effective for large regions, over 100-200 |
| 1009 | lines. For small regions, use `ediff-regions-wordwise'." | 1039 | lines. For small regions, use `ediff-regions-wordwise'. |
| 1040 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 1041 | arguments after setting up the Ediff buffers." | ||
| 1010 | (interactive | 1042 | (interactive |
| 1011 | (let (bf) | 1043 | (let (bf) |
| 1012 | (list (setq bf (read-buffer "Region A's buffer: " | 1044 | (list (setq bf (read-buffer "Region A's buffer: " |
| @@ -1127,7 +1159,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1127 | ;; MERGE-BUFFER-FILE is the file to be | 1159 | ;; MERGE-BUFFER-FILE is the file to be |
| 1128 | ;; associated with the merge buffer | 1160 | ;; associated with the merge buffer |
| 1129 | &optional startup-hooks merge-buffer-file) | 1161 | &optional startup-hooks merge-buffer-file) |
| 1130 | "Merge two files without ancestor." | 1162 | "Merge two files without ancestor. |
| 1163 | FILE-A and FILE-B are the names of the files to be merged. | ||
| 1164 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 1165 | arguments after setting up the Ediff buffers. MERGE-BUFFER-FILE | ||
| 1166 | is the name of the file to be associated with the merge buffer.." | ||
| 1131 | (interactive | 1167 | (interactive |
| 1132 | (let ((dir-A (if ediff-use-last-dir | 1168 | (let ((dir-A (if ediff-use-last-dir |
| 1133 | ediff-last-dir-A | 1169 | ediff-last-dir-A |
| @@ -1171,7 +1207,12 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1171 | ;; to be associated with the | 1207 | ;; to be associated with the |
| 1172 | ;; merge buffer | 1208 | ;; merge buffer |
| 1173 | merge-buffer-file) | 1209 | merge-buffer-file) |
| 1174 | "Merge two files with ancestor." | 1210 | "Merge two files with ancestor. |
| 1211 | FILE-A and FILE-B are the names of the files to be merged, and | ||
| 1212 | FILE-ANCESTOR is the name of the ancestor file. STARTUP-HOOKS is | ||
| 1213 | a list of functions that Emacs calls without arguments after | ||
| 1214 | setting up the Ediff buffers. MERGE-BUFFER-FILE is the name of | ||
| 1215 | the file to be associated with the merge buffer." | ||
| 1175 | (interactive | 1216 | (interactive |
| 1176 | (let ((dir-A (if ediff-use-last-dir | 1217 | (let ((dir-A (if ediff-use-last-dir |
| 1177 | ediff-last-dir-A | 1218 | ediff-last-dir-A |
| @@ -1229,7 +1270,16 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1229 | ;; MERGE-BUFFER-FILE is the file to be | 1270 | ;; MERGE-BUFFER-FILE is the file to be |
| 1230 | ;; associated with the merge buffer | 1271 | ;; associated with the merge buffer |
| 1231 | startup-hooks job-name merge-buffer-file) | 1272 | startup-hooks job-name merge-buffer-file) |
| 1232 | "Merge buffers without ancestor." | 1273 | "Merge buffers without ancestor. |
| 1274 | BUFFER-A and BUFFER-B are the buffers to be merged. | ||
| 1275 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 1276 | arguments after setting up the Ediff buffers. JOB-NAME is a | ||
| 1277 | symbol describing the Ediff job type; it defaults to | ||
| 1278 | `ediff-merge-buffers', but can also be one of | ||
| 1279 | `ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor', | ||
| 1280 | `ediff-last-dir-C', `ediff-buffers', `ediff-buffers3', or | ||
| 1281 | `ediff-merge-buffers-with-ancestor'. MERGE-BUFFER-FILE is the | ||
| 1282 | name of the file to be associated with the merge buffer." | ||
| 1233 | (interactive | 1283 | (interactive |
| 1234 | (let (bf) | 1284 | (let (bf) |
| 1235 | (list (setq bf (read-buffer "Buffer A to merge: " | 1285 | (list (setq bf (read-buffer "Buffer A to merge: " |
| @@ -1256,7 +1306,16 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1256 | ;; file to be associated | 1306 | ;; file to be associated |
| 1257 | ;; with the merge buffer | 1307 | ;; with the merge buffer |
| 1258 | merge-buffer-file) | 1308 | merge-buffer-file) |
| 1259 | "Merge buffers with ancestor." | 1309 | "Merge buffers with ancestor. |
| 1310 | BUFFER-A and BUFFER-B are the buffers to be merged, and | ||
| 1311 | BUFFER-ANCESTOR is their ancestor. STARTUP-HOOKS is a list of | ||
| 1312 | functions that Emacs calls without arguments after setting up the | ||
| 1313 | Ediff buffers. JOB-NAME is a symbol describing the Ediff job | ||
| 1314 | type; it defaults to `ediff-merge-buffers-with-ancestor', but can | ||
| 1315 | also be one of `ediff-merge-files-with-ancestor', | ||
| 1316 | `ediff-last-dir-ancestor', `ediff-last-dir-C', `ediff-buffers', | ||
| 1317 | `ediff-buffers3', or `ediff-merge-buffers'. MERGE-BUFFER-FILE is | ||
| 1318 | the name of the file to be associated with the merge buffer." | ||
| 1260 | (interactive | 1319 | (interactive |
| 1261 | (let (bf bff) | 1320 | (let (bf bff) |
| 1262 | (list (setq bf (read-buffer "Buffer A to merge: " | 1321 | (list (setq bf (read-buffer "Buffer A to merge: " |
| @@ -1287,8 +1346,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1287 | (defun ediff-merge-revisions (&optional file startup-hooks merge-buffer-file) | 1346 | (defun ediff-merge-revisions (&optional file startup-hooks merge-buffer-file) |
| 1288 | ;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer | 1347 | ;; MERGE-BUFFER-FILE is the file to be associated with the merge buffer |
| 1289 | "Run Ediff by merging two revisions of a file. | 1348 | "Run Ediff by merging two revisions of a file. |
| 1290 | The file is the optional FILE argument or the file visited by the current | 1349 | The file is the optional FILE argument or the file visited by the |
| 1291 | buffer." | 1350 | current buffer. STARTUP-HOOKS is a list of functions that Emacs |
| 1351 | calls without arguments after setting up the Ediff buffers. | ||
| 1352 | MERGE-BUFFER-FILE is the name of the file to be associated with | ||
| 1353 | the merge buffer." | ||
| 1292 | (interactive) | 1354 | (interactive) |
| 1293 | (if (stringp file) (find-file file)) | 1355 | (if (stringp file) (find-file file)) |
| 1294 | (let (rev1 rev2) | 1356 | (let (rev1 rev2) |
| @@ -1319,8 +1381,11 @@ buffer." | |||
| 1319 | ;; buffer | 1381 | ;; buffer |
| 1320 | merge-buffer-file) | 1382 | merge-buffer-file) |
| 1321 | "Run Ediff by merging two revisions of a file with a common ancestor. | 1383 | "Run Ediff by merging two revisions of a file with a common ancestor. |
| 1322 | The file is the optional FILE argument or the file visited by the current | 1384 | The file is the optional FILE argument or the file visited by the |
| 1323 | buffer." | 1385 | current buffer. STARTUP-HOOKS is a list of functions that Emacs |
| 1386 | calls without arguments after setting up the Ediff buffers. | ||
| 1387 | MERGE-BUFFER-FILE is the name of the file to be associated with | ||
| 1388 | the merge buffer." | ||
| 1324 | (interactive) | 1389 | (interactive) |
| 1325 | (if (stringp file) (find-file file)) | 1390 | (if (stringp file) (find-file file)) |
| 1326 | (let (rev1 rev2 ancestor-rev) | 1391 | (let (rev1 rev2 ancestor-rev) |
| @@ -1360,8 +1425,8 @@ buffer." | |||
| 1360 | "Query for a file name, and then run Ediff by patching that file. | 1425 | "Query for a file name, and then run Ediff by patching that file. |
| 1361 | If optional PATCH-BUF is given, use the patch in that buffer | 1426 | If optional PATCH-BUF is given, use the patch in that buffer |
| 1362 | and don't ask the user. | 1427 | and don't ask the user. |
| 1363 | If prefix argument, then: if even argument, assume that the patch is in a | 1428 | If prefix argument ARG, then: if even argument, assume that the |
| 1364 | buffer. If odd -- assume it is in a file." | 1429 | patch is in a buffer. If odd -- assume it is in a file." |
| 1365 | (interactive "P") | 1430 | (interactive "P") |
| 1366 | (let (source-dir source-file) | 1431 | (let (source-dir source-file) |
| 1367 | (require 'ediff-ptch) | 1432 | (require 'ediff-ptch) |
| @@ -1394,7 +1459,7 @@ prompts for the buffer or a file, depending on the answer. | |||
| 1394 | With ARG=1, assumes the patch is in a file and prompts for the file. | 1459 | With ARG=1, assumes the patch is in a file and prompts for the file. |
| 1395 | With ARG=2, assumes the patch is in a buffer and prompts for the buffer. | 1460 | With ARG=2, assumes the patch is in a buffer and prompts for the buffer. |
| 1396 | PATCH-BUF is an optional argument, which specifies the buffer that contains the | 1461 | PATCH-BUF is an optional argument, which specifies the buffer that contains the |
| 1397 | patch. If not given, the user is prompted according to the prefix argument." | 1462 | patch. If not given, the user is prompted according to the prefix argument." |
| 1398 | (interactive "P") | 1463 | (interactive "P") |
| 1399 | (require 'ediff-ptch) | 1464 | (require 'ediff-ptch) |
| 1400 | (setq patch-buf | 1465 | (setq patch-buf |
| @@ -1421,7 +1486,9 @@ patch. If not given, the user is prompted according to the prefix argument." | |||
| 1421 | "Run Ediff by comparing versions of a file. | 1486 | "Run Ediff by comparing versions of a file. |
| 1422 | The file is an optional FILE argument or the file entered at the prompt. | 1487 | The file is an optional FILE argument or the file entered at the prompt. |
| 1423 | Default: the file visited by the current buffer. | 1488 | Default: the file visited by the current buffer. |
| 1424 | Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." | 1489 | Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'. |
| 1490 | STARTUP-HOOKS is a list of functions that Emacs calls without | ||
| 1491 | arguments after setting up the Ediff buffers." | ||
| 1425 | ;; if buffer is non-nil, use that buffer instead of the current buffer | 1492 | ;; if buffer is non-nil, use that buffer instead of the current buffer |
| 1426 | (interactive "P") | 1493 | (interactive "P") |
| 1427 | (if (not (stringp file)) | 1494 | (if (not (stringp file)) |
| @@ -1434,7 +1501,7 @@ Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." | |||
| 1434 | 'no-dirs))) | 1501 | 'no-dirs))) |
| 1435 | (find-file file) | 1502 | (find-file file) |
| 1436 | (if (and (buffer-modified-p) | 1503 | (if (and (buffer-modified-p) |
| 1437 | (y-or-n-p (format "Buffer %s is modified. Save buffer? " | 1504 | (y-or-n-p (format "Buffer %s is modified. Save buffer? " |
| 1438 | (buffer-name)))) | 1505 | (buffer-name)))) |
| 1439 | (save-buffer (current-buffer))) | 1506 | (save-buffer (current-buffer))) |
| 1440 | (let (rev1 rev2) | 1507 | (let (rev1 rev2) |
| @@ -1517,6 +1584,7 @@ With optional NODE, goes to that node." | |||
| 1517 | 1584 | ||
| 1518 | ;;;###autoload | 1585 | ;;;###autoload |
| 1519 | (defun ediff-files-command () | 1586 | (defun ediff-files-command () |
| 1587 | "Call `ediff-files' with the next two command line arguments." | ||
| 1520 | (let ((file-a (nth 0 command-line-args-left)) | 1588 | (let ((file-a (nth 0 command-line-args-left)) |
| 1521 | (file-b (nth 1 command-line-args-left))) | 1589 | (file-b (nth 1 command-line-args-left))) |
| 1522 | (setq command-line-args-left (nthcdr 2 command-line-args-left)) | 1590 | (setq command-line-args-left (nthcdr 2 command-line-args-left)) |
| @@ -1524,6 +1592,7 @@ With optional NODE, goes to that node." | |||
| 1524 | 1592 | ||
| 1525 | ;;;###autoload | 1593 | ;;;###autoload |
| 1526 | (defun ediff3-files-command () | 1594 | (defun ediff3-files-command () |
| 1595 | "Call `ediff3-files' with the next three command line arguments." | ||
| 1527 | (let ((file-a (nth 0 command-line-args-left)) | 1596 | (let ((file-a (nth 0 command-line-args-left)) |
| 1528 | (file-b (nth 1 command-line-args-left)) | 1597 | (file-b (nth 1 command-line-args-left)) |
| 1529 | (file-c (nth 2 command-line-args-left))) | 1598 | (file-c (nth 2 command-line-args-left))) |
| @@ -1532,6 +1601,7 @@ With optional NODE, goes to that node." | |||
| 1532 | 1601 | ||
| 1533 | ;;;###autoload | 1602 | ;;;###autoload |
| 1534 | (defun ediff-merge-command () | 1603 | (defun ediff-merge-command () |
| 1604 | "Call `ediff-merge-files' with the next two command line arguments." | ||
| 1535 | (let ((file-a (nth 0 command-line-args-left)) | 1605 | (let ((file-a (nth 0 command-line-args-left)) |
| 1536 | (file-b (nth 1 command-line-args-left))) | 1606 | (file-b (nth 1 command-line-args-left))) |
| 1537 | (setq command-line-args-left (nthcdr 2 command-line-args-left)) | 1607 | (setq command-line-args-left (nthcdr 2 command-line-args-left)) |
| @@ -1539,6 +1609,7 @@ With optional NODE, goes to that node." | |||
| 1539 | 1609 | ||
| 1540 | ;;;###autoload | 1610 | ;;;###autoload |
| 1541 | (defun ediff-merge-with-ancestor-command () | 1611 | (defun ediff-merge-with-ancestor-command () |
| 1612 | "Call `ediff-merge-files-with-ancestor' with the next three command line arguments." | ||
| 1542 | (let ((file-a (nth 0 command-line-args-left)) | 1613 | (let ((file-a (nth 0 command-line-args-left)) |
| 1543 | (file-b (nth 1 command-line-args-left)) | 1614 | (file-b (nth 1 command-line-args-left)) |
| 1544 | (ancestor (nth 2 command-line-args-left))) | 1615 | (ancestor (nth 2 command-line-args-left))) |
| @@ -1547,6 +1618,7 @@ With optional NODE, goes to that node." | |||
| 1547 | 1618 | ||
| 1548 | ;;;###autoload | 1619 | ;;;###autoload |
| 1549 | (defun ediff-directories-command () | 1620 | (defun ediff-directories-command () |
| 1621 | "Call `ediff-directories' with the next three command line arguments." | ||
| 1550 | (let ((file-a (nth 0 command-line-args-left)) | 1622 | (let ((file-a (nth 0 command-line-args-left)) |
| 1551 | (file-b (nth 1 command-line-args-left)) | 1623 | (file-b (nth 1 command-line-args-left)) |
| 1552 | (regexp (nth 2 command-line-args-left))) | 1624 | (regexp (nth 2 command-line-args-left))) |
| @@ -1555,6 +1627,7 @@ With optional NODE, goes to that node." | |||
| 1555 | 1627 | ||
| 1556 | ;;;###autoload | 1628 | ;;;###autoload |
| 1557 | (defun ediff-directories3-command () | 1629 | (defun ediff-directories3-command () |
| 1630 | "Call `ediff-directories3' with the next four command line arguments." | ||
| 1558 | (let ((file-a (nth 0 command-line-args-left)) | 1631 | (let ((file-a (nth 0 command-line-args-left)) |
| 1559 | (file-b (nth 1 command-line-args-left)) | 1632 | (file-b (nth 1 command-line-args-left)) |
| 1560 | (file-c (nth 2 command-line-args-left)) | 1633 | (file-c (nth 2 command-line-args-left)) |
| @@ -1564,6 +1637,7 @@ With optional NODE, goes to that node." | |||
| 1564 | 1637 | ||
| 1565 | ;;;###autoload | 1638 | ;;;###autoload |
| 1566 | (defun ediff-merge-directories-command () | 1639 | (defun ediff-merge-directories-command () |
| 1640 | "Call `ediff-merge-directories' with the next three command line arguments." | ||
| 1567 | (let ((file-a (nth 0 command-line-args-left)) | 1641 | (let ((file-a (nth 0 command-line-args-left)) |
| 1568 | (file-b (nth 1 command-line-args-left)) | 1642 | (file-b (nth 1 command-line-args-left)) |
| 1569 | (regexp (nth 2 command-line-args-left))) | 1643 | (regexp (nth 2 command-line-args-left))) |
| @@ -1572,6 +1646,7 @@ With optional NODE, goes to that node." | |||
| 1572 | 1646 | ||
| 1573 | ;;;###autoload | 1647 | ;;;###autoload |
| 1574 | (defun ediff-merge-directories-with-ancestor-command () | 1648 | (defun ediff-merge-directories-with-ancestor-command () |
| 1649 | "Call `ediff-merge-directories-with-ancestor' with the next four command line arguments." | ||
| 1575 | (let ((file-a (nth 0 command-line-args-left)) | 1650 | (let ((file-a (nth 0 command-line-args-left)) |
| 1576 | (file-b (nth 1 command-line-args-left)) | 1651 | (file-b (nth 1 command-line-args-left)) |
| 1577 | (ancestor (nth 2 command-line-args-left)) | 1652 | (ancestor (nth 2 command-line-args-left)) |