Improve documentation of Ediff wordwise commands

* lisp/vc/ediff.el (ediff-windows-wordwise)
(ediff-windows-linewise, ediff-regions-wordwise): Update and
clarify the doc strings.

* doc/misc/ediff.texi (Major Entry Points): Update and clarify
the documentation of 'ediff-windows-wordwise' and
'ediff-regions-wordwise'.  See the discussion starting at
https://lists.gnu.org/archive/html/help-gnu-emacs/2018-11/msg00197.html
for the details.
This commit is contained in:
Eli Zaretskii 2018-11-27 10:09:55 +02:00
parent 2925ce5a7e
commit f0531b8e64
2 changed files with 12 additions and 10 deletions

View file

@ -210,11 +210,11 @@ ancestors. Ediff selects only the files that are under version control.
@item ediff-windows-wordwise @item ediff-windows-wordwise
@findex ediff-windows-wordwise @findex ediff-windows-wordwise
Compare windows word-by-word. Compare text visible in 2 windows word-by-word.
@item ediff-windows-linewise @item ediff-windows-linewise
@findex ediff-windows-linewise @findex ediff-windows-linewise
Compare windows line-by-line. Compare text visible in 2 windows line-by-line.
@item ediff-regions-wordwise @item ediff-regions-wordwise
@findex ediff-regions-wordwise @findex ediff-regions-wordwise
@ -373,13 +373,12 @@ The commands @code{ediff-windows-wordwise},
@code{ediff-windows-linewise}, @code{ediff-regions-wordwise} and @code{ediff-windows-linewise}, @code{ediff-regions-wordwise} and
@code{ediff-regions-linewise} do comparison on parts of existing Emacs @code{ediff-regions-linewise} do comparison on parts of existing Emacs
buffers. The commands @code{ediff-windows-wordwise} and buffers. The commands @code{ediff-windows-wordwise} and
@code{ediff-regions-wordwise} are intended for relatively small segments @code{ediff-regions-wordwise} could be slow on very large buffers,
of buffers (e.g., up to 100 lines, depending on the speed of your machine),
as they perform comparison on the basis of words rather than lines. as they perform comparison on the basis of words rather than lines.
(Word-wise comparison of large chunks of text can be slow.) (Word-wise comparison of large chunks of text is relatively expensive.)
To compare large regions, use @code{ediff-regions-linewise}. This To compare very large regions, use @code{ediff-regions-linewise}.
command displays differences much like @code{ediff-files} and This command displays differences much like @code{ediff-files} and
@code{ediff-buffers}. @code{ediff-buffers}.
The functions @code{ediff-patch-file} and @code{ediff-patch-buffer} apply a The functions @code{ediff-patch-file} and @code{ediff-patch-buffer} apply a

View file

@ -927,6 +927,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store merged files."
;;;###autoload ;;;###autoload
(defun ediff-windows-wordwise (dumb-mode &optional wind-A wind-B startup-hooks) (defun ediff-windows-wordwise (dumb-mode &optional wind-A wind-B startup-hooks)
"Compare WIND-A and WIND-B, which are selected by clicking, wordwise. "Compare WIND-A and WIND-B, which are selected by clicking, wordwise.
This compares the portions of text visible in each of the two windows.
With prefix argument, DUMB-MODE, or on a non-windowing display, works as With prefix argument, DUMB-MODE, or on a non-windowing display, works as
follows: follows:
If WIND-A is nil, use selected window. If WIND-A is nil, use selected window.
@ -940,6 +941,7 @@ arguments after setting up the Ediff buffers."
;;;###autoload ;;;###autoload
(defun ediff-windows-linewise (dumb-mode &optional wind-A wind-B startup-hooks) (defun ediff-windows-linewise (dumb-mode &optional wind-A wind-B startup-hooks)
"Compare WIND-A and WIND-B, which are selected by clicking, linewise. "Compare WIND-A and WIND-B, which are selected by clicking, linewise.
This compares the portions of text visible in each of the two windows.
With prefix argument, DUMB-MODE, or on a non-windowing display, works as With prefix argument, DUMB-MODE, or on a non-windowing display, works as
follows: follows:
If WIND-A is nil, use selected window. If WIND-A is nil, use selected window.
@ -950,7 +952,8 @@ arguments after setting up the Ediff buffers."
(ediff-windows dumb-mode wind-A wind-B (ediff-windows dumb-mode wind-A wind-B
startup-hooks 'ediff-windows-linewise nil)) startup-hooks 'ediff-windows-linewise nil))
;; Compare WIND-A and WIND-B, which are selected by clicking. ;; Compare visible portions of text in WIND-A and WIND-B, which are
;; selected by clicking.
;; With prefix argument, DUMB-MODE, or on a non-windowing display, ;; With prefix argument, DUMB-MODE, or on a non-windowing display,
;; works as follows: ;; works as follows:
;; If WIND-A is nil, use selected window. ;; If WIND-A is nil, use selected window.
@ -991,8 +994,8 @@ arguments after setting up the Ediff buffers."
"Run Ediff on a pair of regions in specified buffers. "Run Ediff on a pair of regions in specified buffers.
BUFFER-A and BUFFER-B are the buffers to be compared. BUFFER-A and BUFFER-B are the buffers to be compared.
Regions (i.e., point and mark) can be set in advance or marked interactively. Regions (i.e., point and mark) can be set in advance or marked interactively.
This function is effective only for relatively small regions, up to 200 This function might be slow for large regions. If you find it slow,
lines. For large regions, use `ediff-regions-linewise'. use `ediff-regions-linewise' instead.
STARTUP-HOOKS is a list of functions that Emacs calls without STARTUP-HOOKS is a list of functions that Emacs calls without
arguments after setting up the Ediff buffers." arguments after setting up the Ediff buffers."
(interactive (interactive