Function: ediff-wordify
ediff-wordify is a byte-compiled function defined in ediff-diff.el.gz.
Signature
(ediff-wordify BEG END IN-BUFFER OUT-BUFFER &optional CONTROL-BUF)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/ediff-diff.el.gz
(defun ediff-wordify (beg end in-buffer out-buffer &optional control-buf)
(let ((forward-word-function
;; eval in control buf to let user create local versions for
;; different invocations
(if control-buf
(ediff-with-current-buffer control-buf
ediff-forward-word-function)
ediff-forward-word-function))
inbuf-syntax-tbl sv-point diff-string)
(with-current-buffer in-buffer
(setq inbuf-syntax-tbl
(if control-buf
(ediff-with-current-buffer control-buf
ediff-syntax-table)
(syntax-table)))
(setq diff-string (buffer-substring-no-properties beg end))
(set-buffer out-buffer)
;; Make sure that temp buff syntax table is the same as the original buf
;; syntax tbl, because we use ediff-forward-word in both and
;; ediff-forward-word depends on the syntax classes of characters.
(set-syntax-table inbuf-syntax-tbl)
(erase-buffer)
(insert diff-string)
(goto-char (point-min))
(skip-chars-forward ediff-whitespace)
(delete-region (point-min) (point))
(while (not (eobp))
(funcall forward-word-function)
(setq sv-point (point))
(skip-chars-forward ediff-whitespace)
(delete-region sv-point (point))
(insert "\n")))))