aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Zaborsky1992-10-18 19:03:45 +0000
committerChristopher Zaborsky1992-10-18 19:03:45 +0000
commita2a05344bea5813ecd3faff09536a83ea1629a76 (patch)
tree6f14b95e37939f3a07b21fbce88cff4c82ac40ea
parent02c5fd9981a4886448c52caa09e93e764004a638 (diff)
downloademacs-a2a05344bea5813ecd3faff09536a83ea1629a76.tar.gz
emacs-a2a05344bea5813ecd3faff09536a83ea1629a76.zip
Dox fixes.
-rw-r--r--lisp/emerge.el174
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.
567Differs from save-excursion in that it doesn't save the point and mark." 567Differs 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.
577executes make-variable-buffer-local on the variable. Also sets the 577Performs a defvar, then executes `make-variable-buffer-local' on
578'preserved' property, so that kill-all-local-variables (called by major-mode 578the variable. Also sets the 'preserved' property, so that
579setting commands) won't destroy Emerge control variables." 579`kill-all-local-variables' (called by major-mode setting commands)
580won'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.
598through one of the functions: 599It 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
608Commands: 609Commands:
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.
618displays the version." 619When 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'.
663compute values that depend on the flags." 664This is called after these functions are changed to compute values that
665depend 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
880command. 882command.
881This is not a user option, since Emerge uses it for its own processing.") 883This 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'.")
884emerge-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.
1370buffers being merged (read-only, modified, auto-save), and saves them in 1371Must be called in the merge buffer. Remembers read-only, modified,
1371buffer local variables. Sets the buffers read-only and turns off auto-save. 1372auto-save, and saves them in buffer local variables. Sets the buffers
1373read-only and turns off `auto-save-mode'.
1372These characteristics are restored by emerge-restore-buffer-characteristics." 1374These 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.
1499if they are in windows. If an ARGUMENT is given, the default three-window 1501This brings the buffers into view if they are in windows.
1500display is reestablished." 1502If 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.
1630If an ARGUMENT is given, that is how many columns are scrolled, else nearly 1632If an ARGUMENT is given, that is how many columns are scrolled, else nearly
1631the width of the A and B windows. `C-u -' alone as argument scrolls half the 1633the width of the A and B windows. C-u - alone as argument scrolls half the
1632width of the A and B windows." 1634width 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.
1658If an ARGUMENT is given, that is how many columns are scrolled, else nearly 1660If an ARGUMENT is given, that is how many columns are scrolled, else nearly
1659the width of the A and B windows. `C-u -' alone as argument scrolls half the 1661the width of the A and B windows. C-u - alone as argument scrolls half the
1660width of the A and B windows." 1662width 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.
1686if they are in windows." 1688This resets the horizontal scrolling of all three merge buffers
1689to 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.
1770successfully finish. The difference depends on how the merge was started, 1773Prefix argument means to abort rather than successfully finish.
1774The difference depends on how the merge was started,
1771but usually means to not write over one of the original files, or to signal 1775but usually means to not write over one of the original files, or to signal
1772to some process which invoked Emerge a failure code. 1776to 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.
1819difference has been edited, i.e., if it is neither the A nor the B variant. 1823Refuses to function if this difference has been edited, i.e., if it
1824is neither the A nor the B variant.
1820An ARGUMENT forces the variant to be selected even if the difference has 1825An ARGUMENT forces the variant to be selected even if the difference has
1821been edited." 1826been 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.
1847difference has been edited, i.e., if it is neither the A nor the B variant. 1852Refuses to function if this difference has been edited, i.e., if it
1848An ARGUMENT forces the variant to be selected even if the difference has 1853is neither the A nor the B variant. An ARGUMENT forces the variant to be selected even if the difference has
1849been edited." 1854been 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.
1880This selects the A variant for all differences from here down in the buffer
1875which are still defaulted, i.e., which the user has not selected and for 1881which are still defaulted, i.e., which the user has not selected and for
1876which there is no preference." 1882which 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.
1902This selects the B variant for all differences from here down in the buffer
1896which are still defaulted, i.e., which the user has not selected and for 1903which are still defaulted, i.e., which the user has not selected and for
1897which there is no preference." 1904which 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.
1917commands are need not be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." 1924In this mode ordinary Emacs commands are disabled, and Emerge commands
1925are 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.
1930commands must be prefixed with \\<emerge-fast-keymap>\\[emerge-basic-keymap]." 1938In this mode ordinary Emacs commands are available, and Emerge commands
1939must 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 1952This mode causes `emerge-select-A' and `emerge-select-B' to automatically
1944emerge-auto-advance.) 1953advance to the next difference. (See `emerge-auto-advance'.)
1945If a positive ARGUMENT is given, it turns on auto-advance mode. 1954If a positive ARGUMENT is given, it turns on `auto-advance-mode'.
1946If a negative ARGUMENT is given, it turns off auto-advance mode." 1955If 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 1968This mode causes `emerge-next-difference' and `emerge-previous-difference'
1960there is a preference. (See emerge-skip-prefers.) 1969to automatically skip over differences for which there is a preference.
1961If 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
1962If a negative ARGUMENT is given, it turns off skip-prefers mode." 1971`skip-prefers' mode.
1972If 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.
2055Use ^U L to reset the windows afterward." 2065Use 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.
2096argument, join with the preceeding one." 2106With 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.
2211both the A and B versions. (This can happen when the A and B versions 2221If lines are the same in both the A and the B versions, strip them off.
2212have common lines that the ancestor version does not share.)" 2222(This can happen when the A and B versions have common lines that the
2223ancestor 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.
2309A buffer. (Nonetheless, this command must be executed in the merge buffer.) 2320This command must be executed in the merge buffer.
2310If there is no containing difference and the prefix argument is positive, 2321If there is no containing difference and the prefix argument is positive,
2311it finds the nearest following difference. A negative prefix argument finds 2322it finds the nearest following difference. A negative prefix argument finds
2312the nearest previous difference." 2323the 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.
2322B buffer. (Nonetheless, this command must be executed in the merge buffer.) 2333This command must be executed in the merge buffer.
2323If there is no containing difference and the prefix argument is positive, 2334If there is no containing difference and the prefix argument is positive,
2324it finds the nearest following difference. A negative prefix argument finds 2335it finds the nearest following difference. A negative prefix argument finds
2325the nearest previous difference." 2336the 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.
2383This function displays the line numbers of the points in the A, B, and
2372merge buffers." 2384merge 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'.
2402emerge-combine-versions will combine the two versions. 2414This controls how `emerge-combine-versions' will combine the two versions.
2403With prefix argument, emerge-combine-versions is made local to this 2415With prefix argument, `emerge-combine-versions' is made local to this
2404merge buffer. Localization is permanent for any particular merge buffer." 2416merge 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'.
2416emerge-combine-versions-template.
2417Refuses to function if this difference has been edited, i.e., if it is 2428Refuses to function if this difference has been edited, i.e., if it is
2418neither the A nor the B variant. 2429neither the A nor the B variant.
2419An ARGUMENT forces the variant to be selected even if the difference has 2430An argument forces the variant to be selected even if the difference has
2420been edited." 2431been 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.
2426See documentation of the variable emerge-combine-versions-template 2437See documentation of the variable `emerge-combine-versions-template'
2427for how the template is interpreted. 2438for how the template is interpreted.
2428Refuses to function if this difference has been edited, i.e., if it is 2439Refuses to function if this difference has been edited, i.e., if it is
2429neither the A nor the B variant. 2440neither the A nor the B variant.
2430An ARGUMENT forces the variant to be selected even if the difference has 2441An argument forces the variant to be selected even if the difference has
2431been edited." 2442been 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.
2479might make to the mode line or local keymap. Leaves merge in fast mode." 2490Overrides any change that the mode might make to the mode line or local
2491keymap. 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.
2711If he says yes, call write-file to do so. See emerge-query-and-call 2723If he says yes, call `write-file' to do so. See `emerge-query-and-call'
2712for details of the querying process." 2724for 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.
2718If he says yes, call save-buffer to do so. See emerge-query-and-call 2730If he says yes, call `save-buffer' to do so. See `emerge-query-and-call'
2719for details of the querying process." 2731for 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
2779command." 2791command."
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."
2792If optional MINOR is non-nil (or prefix argument is given if interactive), 2804If optional MINOR is non-nil (or prefix argument is given if interactive),
2793display documentation of acive minor modes as well. 2805display documentation of acive minor modes as well.
2794For this to work correctly for a minor mode, the mode's indicator variable 2806For 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
2796describes the minor mode." 2808describes 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
2871keymaps accessible from KEYMAP. Make sure that subordinate keymaps aren't 2883keymaps accessible from KEYMAP. Make sure that subordinate keymaps aren't
2872shared with other keymaps! (copy-keymap will suffice.)" 2884shared 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