diff options
| author | Christopher Zaborsky | 1992-10-18 19:03:45 +0000 |
|---|---|---|
| committer | Christopher Zaborsky | 1992-10-18 19:03:45 +0000 |
| commit | a2a05344bea5813ecd3faff09536a83ea1629a76 (patch) | |
| tree | 6f14b95e37939f3a07b21fbce88cff4c82ac40ea | |
| parent | 02c5fd9981a4886448c52caa09e93e764004a638 (diff) | |
| download | emacs-a2a05344bea5813ecd3faff09536a83ea1629a76.tar.gz emacs-a2a05344bea5813ecd3faff09536a83ea1629a76.zip | |
Dox fixes.
| -rw-r--r-- | lisp/emerge.el | 174 |
1 files changed, 93 insertions, 81 deletions
diff --git a/lisp/emerge.el b/lisp/emerge.el index 126b99c3aa2..e3c06979100 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el | |||
| @@ -564,7 +564,7 @@ | |||
| 564 | 564 | ||
| 565 | (defmacro emerge-eval-in-buffer (buffer &rest forms) | 565 | (defmacro emerge-eval-in-buffer (buffer &rest forms) |
| 566 | "Macro to switch to BUFFER, evaluate FORMS, returns to original buffer. | 566 | "Macro to switch to BUFFER, evaluate FORMS, returns to original buffer. |
| 567 | Differs from save-excursion in that it doesn't save the point and mark." | 567 | Differs from `save-excursion' in that it doesn't save the point and mark." |
| 568 | (` (let ((StartBuffer (current-buffer))) | 568 | (` (let ((StartBuffer (current-buffer))) |
| 569 | (unwind-protect | 569 | (unwind-protect |
| 570 | (progn | 570 | (progn |
| @@ -573,10 +573,11 @@ Differs from save-excursion in that it doesn't save the point and mark." | |||
| 573 | (set-buffer StartBuffer))))) | 573 | (set-buffer StartBuffer))))) |
| 574 | 574 | ||
| 575 | (defmacro emerge-defvar-local (var value doc) | 575 | (defmacro emerge-defvar-local (var value doc) |
| 576 | "Defines SYMBOL as an advertised variable. Performs a defvar, then | 576 | "Defines SYMBOL as an advertised variable. |
| 577 | executes make-variable-buffer-local on the variable. Also sets the | 577 | Performs a defvar, then executes `make-variable-buffer-local' on |
| 578 | 'preserved' property, so that kill-all-local-variables (called by major-mode | 578 | the variable. Also sets the 'preserved' property, so that |
| 579 | setting commands) won't destroy Emerge control variables." | 579 | `kill-all-local-variables' (called by major-mode setting commands) |
| 580 | won't destroy Emerge control variables." | ||
| 580 | (` (progn | 581 | (` (progn |
| 581 | (defvar (, var) (, value) (, doc)) | 582 | (defvar (, var) (, value) (, doc)) |
| 582 | (make-variable-buffer-local '(, var)) | 583 | (make-variable-buffer-local '(, var)) |
| @@ -594,16 +595,16 @@ setting commands) won't destroy Emerge control variables." | |||
| 594 | 595 | ||
| 595 | ;; We need to define this function so describe-mode can describe Emerge mode. | 596 | ;; We need to define this function so describe-mode can describe Emerge mode. |
| 596 | (defun emerge-mode () | 597 | (defun emerge-mode () |
| 597 | "Emerge mode is used by the Emerge file-merging package. It is entered only | 598 | "Emerge mode is used by the Emerge file-merging package. |
| 598 | through one of the functions: | 599 | It is entered only through one of the functions: |
| 599 | emerge-files | 600 | `emerge-files' |
| 600 | emerge-files-with-ancestor | 601 | `emerge-files-with-ancestor' |
| 601 | emerge-buffers | 602 | `emerge-buffers' |
| 602 | emerge-buffers-with-ancestor | 603 | `emerge-buffers-with-ancestor' |
| 603 | emerge-files-command | 604 | `emerge-files-command' |
| 604 | emerge-files-with-ancestor-command | 605 | `emerge-files-with-ancestor-command' |
| 605 | emerge-files-remote | 606 | `emerge-files-remote' |
| 606 | emerge-files-with-ancestor-remote | 607 | `emerge-files-with-ancestor-remote' |
| 607 | 608 | ||
| 608 | Commands: | 609 | Commands: |
| 609 | \\{emerge-basic-keymap} | 610 | \\{emerge-basic-keymap} |
| @@ -614,8 +615,8 @@ in 'fast' mode.") | |||
| 614 | "The version of Emerge.") | 615 | "The version of Emerge.") |
| 615 | 616 | ||
| 616 | (defun emerge-version () | 617 | (defun emerge-version () |
| 617 | "Return string describing the version of Emerge. When called interactively, | 618 | "Return string describing the version of Emerge. |
| 618 | displays the version." | 619 | When called interactively, displays the version." |
| 619 | (interactive) | 620 | (interactive) |
| 620 | (if (interactive-p) | 621 | (if (interactive-p) |
| 621 | (message "Emerge version %s" (emerge-version)) | 622 | (message "Emerge version %s" (emerge-version)) |
| @@ -659,8 +660,9 @@ Lines that do not match are assumed to be error output.") | |||
| 659 | ;; These function definitions need to be up here, because they are used | 660 | ;; These function definitions need to be up here, because they are used |
| 660 | ;; during loading. | 661 | ;; during loading. |
| 661 | (defun emerge-new-flags () | 662 | (defun emerge-new-flags () |
| 662 | "Function to be called after emerge-{before,after}-flag are changed to | 663 | "Function to be called after `emerge-{before,after}-flag'. |
| 663 | compute values that depend on the flags." | 664 | This is called after these functions are changed to compute values that |
| 665 | depend on the flags." | ||
| 664 | (setq emerge-before-flag-length (length emerge-before-flag)) | 666 | (setq emerge-before-flag-length (length emerge-before-flag)) |
| 665 | (setq emerge-before-flag-lines | 667 | (setq emerge-before-flag-lines |
| 666 | (count-matches-string emerge-before-flag "\n")) | 668 | (count-matches-string emerge-before-flag "\n")) |
| @@ -880,8 +882,7 @@ emerge-prefix-argument will be bound to the prefix argument of the emerge-quit | |||
| 880 | command. | 882 | command. |
| 881 | This is not a user option, since Emerge uses it for its own processing.") | 883 | This is not a user option, since Emerge uses it for its own processing.") |
| 882 | (emerge-defvar-local emerge-output-description nil | 884 | (emerge-defvar-local emerge-output-description nil |
| 883 | "Describes output destination of the merge, for the use of | 885 | "Describes output destination merge, for the use of `emerge-file-names'.") |
| 884 | emerge-file-names.") | ||
| 885 | 886 | ||
| 886 | ;;; Setup functions for two-file mode. | 887 | ;;; Setup functions for two-file mode. |
| 887 | 888 | ||
| @@ -1366,9 +1367,10 @@ emerge-file-names.") | |||
| 1366 | (setq emerge-fast-mode t)) | 1367 | (setq emerge-fast-mode t)) |
| 1367 | 1368 | ||
| 1368 | (defun emerge-remember-buffer-characteristics () | 1369 | (defun emerge-remember-buffer-characteristics () |
| 1369 | "Must be called in the merge buffer. Remembers certain properties of the | 1370 | "Remembers certain properties of the buffers being merged. |
| 1370 | buffers being merged (read-only, modified, auto-save), and saves them in | 1371 | Must be called in the merge buffer. Remembers read-only, modified, |
| 1371 | buffer local variables. Sets the buffers read-only and turns off auto-save. | 1372 | auto-save, and saves them in buffer local variables. Sets the buffers |
| 1373 | read-only and turns off `auto-save-mode'. | ||
| 1372 | These characteristics are restored by emerge-restore-buffer-characteristics." | 1374 | These characteristics are restored by emerge-restore-buffer-characteristics." |
| 1373 | ;; force auto-save, because we will turn off auto-saving in buffers for the | 1375 | ;; force auto-save, because we will turn off auto-saving in buffers for the |
| 1374 | ;; duration | 1376 | ;; duration |
| @@ -1495,9 +1497,9 @@ emerge-remember-buffer-characteristics." | |||
| 1495 | ;;; Commands | 1497 | ;;; Commands |
| 1496 | 1498 | ||
| 1497 | (defun emerge-recenter (&optional arg) | 1499 | (defun emerge-recenter (&optional arg) |
| 1498 | "Bring the highlighted region of all three merge buffers into view, | 1500 | "Bring the highlighted region of all three merge buffers into view. |
| 1499 | if they are in windows. If an ARGUMENT is given, the default three-window | 1501 | This brings the buffers into view if they are in windows. |
| 1500 | display is reestablished." | 1502 | If an ARGUMENT is given, the default three-window display is reestablished." |
| 1501 | (interactive "P") | 1503 | (interactive "P") |
| 1502 | ;; If there is an argument, rebuild the window structure | 1504 | ;; If there is an argument, rebuild the window structure |
| 1503 | (if arg | 1505 | (if arg |
| @@ -1628,7 +1630,7 @@ size of the merge window." | |||
| 1628 | (defun emerge-scroll-left (&optional arg) | 1630 | (defun emerge-scroll-left (&optional arg) |
| 1629 | "Scroll left all three merge buffers, if they are in windows. | 1631 | "Scroll left all three merge buffers, if they are in windows. |
| 1630 | If an ARGUMENT is given, that is how many columns are scrolled, else nearly | 1632 | If an ARGUMENT is given, that is how many columns are scrolled, else nearly |
| 1631 | the width of the A and B windows. `C-u -' alone as argument scrolls half the | 1633 | the width of the A and B windows. C-u - alone as argument scrolls half the |
| 1632 | width of the A and B windows." | 1634 | width of the A and B windows." |
| 1633 | (interactive "P") | 1635 | (interactive "P") |
| 1634 | (emerge-operate-on-windows | 1636 | (emerge-operate-on-windows |
| @@ -1656,7 +1658,7 @@ width of the A and B windows." | |||
| 1656 | (defun emerge-scroll-right (&optional arg) | 1658 | (defun emerge-scroll-right (&optional arg) |
| 1657 | "Scroll right all three merge buffers, if they are in windows. | 1659 | "Scroll right all three merge buffers, if they are in windows. |
| 1658 | If an ARGUMENT is given, that is how many columns are scrolled, else nearly | 1660 | If an ARGUMENT is given, that is how many columns are scrolled, else nearly |
| 1659 | the width of the A and B windows. `C-u -' alone as argument scrolls half the | 1661 | the width of the A and B windows. C-u - alone as argument scrolls half the |
| 1660 | width of the A and B windows." | 1662 | width of the A and B windows." |
| 1661 | (interactive "P") | 1663 | (interactive "P") |
| 1662 | (emerge-operate-on-windows | 1664 | (emerge-operate-on-windows |
| @@ -1682,8 +1684,9 @@ width of the A and B windows." | |||
| 1682 | default-amount))))))) | 1684 | default-amount))))))) |
| 1683 | 1685 | ||
| 1684 | (defun emerge-scroll-reset () | 1686 | (defun emerge-scroll-reset () |
| 1685 | "Reset horizontal scrolling of all three merge buffers to the left margin, | 1687 | "Reset horizontal scrolling. |
| 1686 | if they are in windows." | 1688 | This resets the horizontal scrolling of all three merge buffers |
| 1689 | to the left margin, if they are in windows." | ||
| 1687 | (interactive) | 1690 | (interactive) |
| 1688 | (emerge-operate-on-windows | 1691 | (emerge-operate-on-windows |
| 1689 | (function (lambda (x) (set-window-hscroll (selected-window) 0))) | 1692 | (function (lambda (x) (set-window-hscroll (selected-window) 0))) |
| @@ -1766,8 +1769,9 @@ if they are in windows." | |||
| 1766 | (error "Bad difference number")))) | 1769 | (error "Bad difference number")))) |
| 1767 | 1770 | ||
| 1768 | (defun emerge-quit (arg) | 1771 | (defun emerge-quit (arg) |
| 1769 | "Finish an Emerge session. Prefix ARGUMENT means to abort rather than | 1772 | "Finish an Emerge session. |
| 1770 | successfully finish. The difference depends on how the merge was started, | 1773 | Prefix argument means to abort rather than successfully finish. |
| 1774 | The difference depends on how the merge was started, | ||
| 1771 | but usually means to not write over one of the original files, or to signal | 1775 | but usually means to not write over one of the original files, or to signal |
| 1772 | to some process which invoked Emerge a failure code. | 1776 | to some process which invoked Emerge a failure code. |
| 1773 | 1777 | ||
| @@ -1815,8 +1819,9 @@ buffer after this will cause serious problems." | |||
| 1815 | (run-hooks 'emerge-quit-hook))) | 1819 | (run-hooks 'emerge-quit-hook))) |
| 1816 | 1820 | ||
| 1817 | (defun emerge-select-A (&optional force) | 1821 | (defun emerge-select-A (&optional force) |
| 1818 | "Select the A variant of this difference. Refuses to function if this | 1822 | "Select the A variant of this difference. |
| 1819 | difference has been edited, i.e., if it is neither the A nor the B variant. | 1823 | Refuses to function if this difference has been edited, i.e., if it |
| 1824 | is neither the A nor the B variant. | ||
| 1820 | An ARGUMENT forces the variant to be selected even if the difference has | 1825 | An ARGUMENT forces the variant to be selected even if the difference has |
| 1821 | been edited." | 1826 | been edited." |
| 1822 | (interactive "P") | 1827 | (interactive "P") |
| @@ -1843,9 +1848,9 @@ been edited." | |||
| 1843 | (emerge-refresh-mode-line))) | 1848 | (emerge-refresh-mode-line))) |
| 1844 | 1849 | ||
| 1845 | (defun emerge-select-B (&optional force) | 1850 | (defun emerge-select-B (&optional force) |
| 1846 | "Select the B variant of this difference. Refuses to function if this | 1851 | "Select the B variant of this difference. |
| 1847 | difference has been edited, i.e., if it is neither the A nor the B variant. | 1852 | Refuses to function if this difference has been edited, i.e., if it |
| 1848 | An ARGUMENT forces the variant to be selected even if the difference has | 1853 | is neither the A nor the B variant. An ARGUMENT forces the variant to be selected even if the difference has |
| 1849 | been edited." | 1854 | been edited." |
| 1850 | (interactive "P") | 1855 | (interactive "P") |
| 1851 | (let ((operate | 1856 | (let ((operate |
| @@ -1871,7 +1876,8 @@ been edited." | |||
| 1871 | (emerge-refresh-mode-line))) | 1876 | (emerge-refresh-mode-line))) |
| 1872 | 1877 | ||
| 1873 | (defun emerge-default-A () | 1878 | (defun emerge-default-A () |
| 1874 | "Selects the A variant for all differences from here down in the buffer | 1879 | "Selects the A variant. |
| 1880 | This selects the A variant for all differences from here down in the buffer | ||
| 1875 | which are still defaulted, i.e., which the user has not selected and for | 1881 | which are still defaulted, i.e., which the user has not selected and for |
| 1876 | which there is no preference." | 1882 | which there is no preference." |
| 1877 | (interactive) | 1883 | (interactive) |
| @@ -1892,7 +1898,8 @@ which there is no preference." | |||
| 1892 | (message "Default A set")) | 1898 | (message "Default A set")) |
| 1893 | 1899 | ||
| 1894 | (defun emerge-default-B () | 1900 | (defun emerge-default-B () |
| 1895 | "Selects the B variant for all differences from here down in the buffer | 1901 | "Selects the B variant. |
| 1902 | This selects the B variant for all differences from here down in the buffer | ||
| 1896 | which are still defaulted, i.e., which the user has not selected and for | 1903 | which are still defaulted, i.e., which the user has not selected and for |
| 1897 | which there is no preference." | 1904 | which there is no preference." |
| 1898 | (interactive) | 1905 | (interactive) |
| @@ -1913,8 +1920,9 @@ which there is no preference." | |||
| 1913 | (message "Default B set")) | 1920 | (message "Default B set")) |
| 1914 | 1921 | ||
| 1915 | (defun emerge-fast-mode () | 1922 | (defun emerge-fast-mode () |
| 1916 | "Set fast mode, in which ordinary Emacs commands are disabled, and Emerge | 1923 | "Set fast mode. |
| 1917 | commands are need not be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." | 1924 | In this mode ordinary Emacs commands are disabled, and Emerge commands |
| 1925 | are need not be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." | ||
| 1918 | (interactive) | 1926 | (interactive) |
| 1919 | (setq buffer-read-only t) | 1927 | (setq buffer-read-only t) |
| 1920 | (use-local-map emerge-fast-keymap) | 1928 | (use-local-map emerge-fast-keymap) |
| @@ -1926,8 +1934,9 @@ commands are need not be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-key | |||
| 1926 | (set-buffer-modified-p (buffer-modified-p))) | 1934 | (set-buffer-modified-p (buffer-modified-p))) |
| 1927 | 1935 | ||
| 1928 | (defun emerge-edit-mode () | 1936 | (defun emerge-edit-mode () |
| 1929 | "Set edit mode, in which ordinary Emacs commands are available, and Emerge | 1937 | "Set edit mode. |
| 1930 | commands must be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." | 1938 | In this mode ordinary Emacs commands are available, and Emerge commands |
| 1939 | must be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." | ||
| 1931 | (interactive) | 1940 | (interactive) |
| 1932 | (setq buffer-read-only nil) | 1941 | (setq buffer-read-only nil) |
| 1933 | (use-local-map emerge-edit-keymap) | 1942 | (use-local-map emerge-edit-keymap) |
| @@ -1939,11 +1948,11 @@ commands must be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." | |||
| 1939 | (set-buffer-modified-p (buffer-modified-p))) | 1948 | (set-buffer-modified-p (buffer-modified-p))) |
| 1940 | 1949 | ||
| 1941 | (defun emerge-auto-advance (arg) | 1950 | (defun emerge-auto-advance (arg) |
| 1942 | "Toggle auto-advance mode, which causes emerge-select-A and | 1951 | "Toggle auto-advance mode. |
| 1943 | emerge-select-B to automatically advance to the next difference. (See | 1952 | This mode causes `emerge-select-A' and `emerge-select-B' to automatically |
| 1944 | emerge-auto-advance.) | 1953 | advance to the next difference. (See `emerge-auto-advance'.) |
| 1945 | If a positive ARGUMENT is given, it turns on auto-advance mode. | 1954 | If a positive ARGUMENT is given, it turns on `auto-advance-mode'. |
| 1946 | If a negative ARGUMENT is given, it turns off auto-advance mode." | 1955 | If a negative ARGUMENT is given, it turns off `auto-advance-mode'." |
| 1947 | (interactive "P") | 1956 | (interactive "P") |
| 1948 | (setq emerge-auto-advance (if (null arg) | 1957 | (setq emerge-auto-advance (if (null arg) |
| 1949 | (not emerge-auto-advance) | 1958 | (not emerge-auto-advance) |
| @@ -1955,11 +1964,12 @@ If a negative ARGUMENT is given, it turns off auto-advance mode." | |||
| 1955 | (set-buffer-modified-p (buffer-modified-p))) | 1964 | (set-buffer-modified-p (buffer-modified-p))) |
| 1956 | 1965 | ||
| 1957 | (defun emerge-skip-prefers (arg) | 1966 | (defun emerge-skip-prefers (arg) |
| 1958 | "Toggle skip-prefers mode, which causes emerge-next-difference and | 1967 | "Toggle skip-prefers mode. |
| 1959 | emerge-previous-difference to automatically skip over differences for which | 1968 | This mode causes `emerge-next-difference' and `emerge-previous-difference' |
| 1960 | there is a preference. (See emerge-skip-prefers.) | 1969 | to automatically skip over differences for which there is a preference. |
| 1961 | If a positive ARGUMENT is given, it turns on skip-prefers mode. | 1970 | (See `emerge-skip-prefers'.) If a positive ARG is given, it turns on |
| 1962 | If a negative ARGUMENT is given, it turns off skip-prefers mode." | 1971 | `skip-prefers' mode. |
| 1972 | If a negative ARG is given, it turns off `skip-prefers' mode." | ||
| 1963 | (interactive "P") | 1973 | (interactive "P") |
| 1964 | (setq emerge-skip-prefers (if (null arg) | 1974 | (setq emerge-skip-prefers (if (null arg) |
| 1965 | (not emerge-skip-prefers) | 1975 | (not emerge-skip-prefers) |
| @@ -2052,7 +2062,7 @@ With prefix argument, puts mark before, point after." | |||
| 2052 | 2062 | ||
| 2053 | (defun emerge-file-names () | 2063 | (defun emerge-file-names () |
| 2054 | "Show the names of the buffers or files being operated on by Emerge. | 2064 | "Show the names of the buffers or files being operated on by Emerge. |
| 2055 | Use ^U L to reset the windows afterward." | 2065 | Use C-u l to reset the windows afterward." |
| 2056 | (interactive) | 2066 | (interactive) |
| 2057 | (delete-other-windows) | 2067 | (delete-other-windows) |
| 2058 | (let ((temp-buffer-show-hook | 2068 | (let ((temp-buffer-show-hook |
| @@ -2092,8 +2102,8 @@ Use ^U L to reset the windows afterward." | |||
| 2092 | (princ emerge-output-description)))) | 2102 | (princ emerge-output-description)))) |
| 2093 | 2103 | ||
| 2094 | (defun emerge-join-differences (arg) | 2104 | (defun emerge-join-differences (arg) |
| 2095 | "Join the selected difference with the following one. With a prefix | 2105 | "Join the selected difference with the following one. |
| 2096 | argument, join with the preceeding one." | 2106 | With a prefix argument, join with the preceeding one." |
| 2097 | (interactive "P") | 2107 | (interactive "P") |
| 2098 | (let ((n emerge-current-difference)) | 2108 | (let ((n emerge-current-difference)) |
| 2099 | ;; adjust n to be first difference to join | 2109 | ;; adjust n to be first difference to join |
| @@ -2207,9 +2217,10 @@ argument, join with the preceeding one." | |||
| 2207 | (emerge-recenter)))) | 2217 | (emerge-recenter)))) |
| 2208 | 2218 | ||
| 2209 | (defun emerge-trim-difference () | 2219 | (defun emerge-trim-difference () |
| 2210 | "Trim lines off the top and bottom of a difference that are the same in | 2220 | "Trim lines off top and bottom of difference that are the same. |
| 2211 | both the A and B versions. (This can happen when the A and B versions | 2221 | If lines are the same in both the A and the B versions, strip them off. |
| 2212 | have common lines that the ancestor version does not share.)" | 2222 | (This can happen when the A and B versions have common lines that the |
| 2223 | ancestor version does not share.)" | ||
| 2213 | (interactive) | 2224 | (interactive) |
| 2214 | ;; make sure we are in a real difference | 2225 | ;; make sure we are in a real difference |
| 2215 | (emerge-validate-difference) | 2226 | (emerge-validate-difference) |
| @@ -2305,8 +2316,8 @@ the nearest previous difference." | |||
| 2305 | (emerge-find-difference1 arg (point) 4 5)) | 2316 | (emerge-find-difference1 arg (point) 4 5)) |
| 2306 | 2317 | ||
| 2307 | (defun emerge-find-difference-A (arg) | 2318 | (defun emerge-find-difference-A (arg) |
| 2308 | "Find the difference containing the current position of the point in the | 2319 | "Find the difference containing the position of the point in the A buffer. |
| 2309 | A buffer. (Nonetheless, this command must be executed in the merge buffer.) | 2320 | This command must be executed in the merge buffer. |
| 2310 | If there is no containing difference and the prefix argument is positive, | 2321 | If there is no containing difference and the prefix argument is positive, |
| 2311 | it finds the nearest following difference. A negative prefix argument finds | 2322 | it finds the nearest following difference. A negative prefix argument finds |
| 2312 | the nearest previous difference." | 2323 | the nearest previous difference." |
| @@ -2318,8 +2329,8 @@ the nearest previous difference." | |||
| 2318 | 0 1)) | 2329 | 0 1)) |
| 2319 | 2330 | ||
| 2320 | (defun emerge-find-difference-B (arg) | 2331 | (defun emerge-find-difference-B (arg) |
| 2321 | "Find the difference containing the current position of the point in the | 2332 | "Find the difference containing the position of the point in the B buffer. |
| 2322 | B buffer. (Nonetheless, this command must be executed in the merge buffer.) | 2333 | This command must be executed in the merge buffer. |
| 2323 | If there is no containing difference and the prefix argument is positive, | 2334 | If there is no containing difference and the prefix argument is positive, |
| 2324 | it finds the nearest following difference. A negative prefix argument finds | 2335 | it finds the nearest following difference. A negative prefix argument finds |
| 2325 | the nearest previous difference." | 2336 | the nearest previous difference." |
| @@ -2368,7 +2379,8 @@ the nearest previous difference." | |||
| 2368 | (error "No difference contains or preceeds point"))))))) | 2379 | (error "No difference contains or preceeds point"))))))) |
| 2369 | 2380 | ||
| 2370 | (defun emerge-line-numbers () | 2381 | (defun emerge-line-numbers () |
| 2371 | "Display the current line numbers of the points in the A, B, and | 2382 | "Display the current line numbers. |
| 2383 | This function displays the line numbers of the points in the A, B, and | ||
| 2372 | merge buffers." | 2384 | merge buffers." |
| 2373 | (interactive) | 2385 | (interactive) |
| 2374 | (let* ((valid-diff | 2386 | (let* ((valid-diff |
| @@ -2398,9 +2410,9 @@ merge buffers." | |||
| 2398 | temp)) | 2410 | temp)) |
| 2399 | 2411 | ||
| 2400 | (defun emerge-set-combine-versions-template (start end &optional localize) | 2412 | (defun emerge-set-combine-versions-template (start end &optional localize) |
| 2401 | "Copy region into emerge-combine-versions-template which controls how | 2413 | "Copy region into `emerge-combine-versions-template'. |
| 2402 | emerge-combine-versions will combine the two versions. | 2414 | This controls how `emerge-combine-versions' will combine the two versions. |
| 2403 | With prefix argument, emerge-combine-versions is made local to this | 2415 | With prefix argument, `emerge-combine-versions' is made local to this |
| 2404 | merge buffer. Localization is permanent for any particular merge buffer." | 2416 | merge buffer. Localization is permanent for any particular merge buffer." |
| 2405 | (interactive "r\nP") | 2417 | (interactive "r\nP") |
| 2406 | (if localize | 2418 | (if localize |
| @@ -2412,22 +2424,21 @@ merge buffer. Localization is permanent for any particular merge buffer." | |||
| 2412 | "emerge-set-combine-versions-template set."))) | 2424 | "emerge-set-combine-versions-template set."))) |
| 2413 | 2425 | ||
| 2414 | (defun emerge-combine-versions (&optional force) | 2426 | (defun emerge-combine-versions (&optional force) |
| 2415 | "Combine the two versions using the template in | 2427 | "Combine versions using the template in `emerge-combine-versions-template'. |
| 2416 | emerge-combine-versions-template. | ||
| 2417 | Refuses to function if this difference has been edited, i.e., if it is | 2428 | Refuses to function if this difference has been edited, i.e., if it is |
| 2418 | neither the A nor the B variant. | 2429 | neither the A nor the B variant. |
| 2419 | An ARGUMENT forces the variant to be selected even if the difference has | 2430 | An argument forces the variant to be selected even if the difference has |
| 2420 | been edited." | 2431 | been edited." |
| 2421 | (interactive "P") | 2432 | (interactive "P") |
| 2422 | (emerge-combine-versions-internal emerge-combine-versions-template force)) | 2433 | (emerge-combine-versions-internal emerge-combine-versions-template force)) |
| 2423 | 2434 | ||
| 2424 | (defun emerge-combine-versions-register (char &optional force) | 2435 | (defun emerge-combine-versions-register (char &optional force) |
| 2425 | "Combine the two versions using the template in register REG. | 2436 | "Combine the two versions using the template in register REG. |
| 2426 | See documentation of the variable emerge-combine-versions-template | 2437 | See documentation of the variable `emerge-combine-versions-template' |
| 2427 | for how the template is interpreted. | 2438 | for how the template is interpreted. |
| 2428 | Refuses to function if this difference has been edited, i.e., if it is | 2439 | Refuses to function if this difference has been edited, i.e., if it is |
| 2429 | neither the A nor the B variant. | 2440 | neither the A nor the B variant. |
| 2430 | An ARGUMENT forces the variant to be selected even if the difference has | 2441 | An argument forces the variant to be selected even if the difference has |
| 2431 | been edited." | 2442 | been edited." |
| 2432 | (interactive "cRegister containing template: \nP") | 2443 | (interactive "cRegister containing template: \nP") |
| 2433 | (let ((template (get-register char))) | 2444 | (let ((template (get-register char))) |
| @@ -2475,8 +2486,9 @@ been edited." | |||
| 2475 | (emerge-refresh-mode-line))) | 2486 | (emerge-refresh-mode-line))) |
| 2476 | 2487 | ||
| 2477 | (defun emerge-set-merge-mode (mode) | 2488 | (defun emerge-set-merge-mode (mode) |
| 2478 | "Set the major mode in a merge buffer. Overrides any change that the mode | 2489 | "Set the major mode in a merge buffer. |
| 2479 | might make to the mode line or local keymap. Leaves merge in fast mode." | 2490 | Overrides any change that the mode might make to the mode line or local |
| 2491 | keymap. Leaves merge in fast mode." | ||
| 2480 | (interactive | 2492 | (interactive |
| 2481 | (list (intern (completing-read "New major mode for merge buffer: " | 2493 | (list (intern (completing-read "New major mode for merge buffer: " |
| 2482 | obarray 'commandp t nil)))) | 2494 | obarray 'commandp t nil)))) |
| @@ -2708,14 +2720,14 @@ might make to the mode line or local keymap. Leaves merge in fast mode." | |||
| 2708 | 2720 | ||
| 2709 | (defun emerge-query-write-file () | 2721 | (defun emerge-query-write-file () |
| 2710 | "Query the user if he really wants to write out the incomplete merge. | 2722 | "Query the user if he really wants to write out the incomplete merge. |
| 2711 | If he says yes, call write-file to do so. See emerge-query-and-call | 2723 | If he says yes, call `write-file' to do so. See `emerge-query-and-call' |
| 2712 | for details of the querying process." | 2724 | for details of the querying process." |
| 2713 | (interactive) | 2725 | (interactive) |
| 2714 | (emerge-query-and-call 'write-file)) | 2726 | (emerge-query-and-call 'write-file)) |
| 2715 | 2727 | ||
| 2716 | (defun emerge-query-save-buffer () | 2728 | (defun emerge-query-save-buffer () |
| 2717 | "Query the user if he really wants to write out the incomplete merge. | 2729 | "Query the user if he really wants to write out the incomplete merge. |
| 2718 | If he says yes, call save-buffer to do so. See emerge-query-and-call | 2730 | If he says yes, call `save-buffer' to do so. See `emerge-query-and-call' |
| 2719 | for details of the querying process." | 2731 | for details of the querying process." |
| 2720 | (interactive) | 2732 | (interactive) |
| 2721 | (emerge-query-and-call 'save-buffer)) | 2733 | (emerge-query-and-call 'save-buffer)) |
| @@ -2775,7 +2787,7 @@ around the current difference are removed." | |||
| 2775 | 2787 | ||
| 2776 | ;; Define a key, even if a prefix of it is defined | 2788 | ;; Define a key, even if a prefix of it is defined |
| 2777 | (defun emerge-force-define-key (keymap key definition) | 2789 | (defun emerge-force-define-key (keymap key definition) |
| 2778 | "Like define-key, but is not stopped if a prefix of KEY is a defined | 2790 | "Like `define-key', but isn't stopped if a prefix of KEY is a defined |
| 2779 | command." | 2791 | command." |
| 2780 | ;; Find out if a prefix of key is defined | 2792 | ;; Find out if a prefix of key is defined |
| 2781 | (let ((v (lookup-key keymap key))) | 2793 | (let ((v (lookup-key keymap key))) |
| @@ -2792,7 +2804,7 @@ command." | |||
| 2792 | If optional MINOR is non-nil (or prefix argument is given if interactive), | 2804 | If optional MINOR is non-nil (or prefix argument is given if interactive), |
| 2793 | display documentation of acive minor modes as well. | 2805 | display documentation of acive minor modes as well. |
| 2794 | For this to work correctly for a minor mode, the mode's indicator variable | 2806 | For this to work correctly for a minor mode, the mode's indicator variable |
| 2795 | (listed in minor-mode-alist) must also be a function whose documentation | 2807 | (listed in `minor-mode-alist') must also be a function whose documentation |
| 2796 | describes the minor mode." | 2808 | describes the minor mode." |
| 2797 | (interactive) | 2809 | (interactive) |
| 2798 | (with-output-to-temp-buffer "*Help*" | 2810 | (with-output-to-temp-buffer "*Help*" |
| @@ -2867,9 +2879,9 @@ including those whose definition is OLDDEF." | |||
| 2867 | (define-key keymap key definition))))) | 2879 | (define-key keymap key definition))))) |
| 2868 | 2880 | ||
| 2869 | (defun emerge-recursively-substitute-key-definition (olddef newdef keymap) | 2881 | (defun emerge-recursively-substitute-key-definition (olddef newdef keymap) |
| 2870 | "Like substitute-key-definition, but examines and substitutes in all | 2882 | "Like `substitute-key-definition', but examines and substitutes in all |
| 2871 | keymaps accessible from KEYMAP. Make sure that subordinate keymaps aren't | 2883 | keymaps accessible from KEYMAP. Make sure that subordinate keymaps aren't |
| 2872 | shared with other keymaps! (copy-keymap will suffice.)" | 2884 | shared with other keymaps! (`copy-keymap' will suffice.)" |
| 2873 | ;; Loop through all keymaps accessible from keymap | 2885 | ;; Loop through all keymaps accessible from keymap |
| 2874 | (let ((maps (accessible-keymaps keymap))) | 2886 | (let ((maps (accessible-keymaps keymap))) |
| 2875 | (while maps | 2887 | (while maps |