Function: ediff-patch-buffer

ediff-patch-buffer is an autoloaded, interactive and byte-compiled function defined in ediff.el.gz.

Signature

(ediff-patch-buffer &optional ARG PATCH-BUF)

Documentation

Run Ediff by patching the buffer specified at prompt.

Without the optional prefix ARG, asks if the patch is in some buffer and prompts for the buffer or a file, depending on the answer. With ARG=1, assumes the patch is in a file and prompts for the file. With ARG=2, assumes the patch is in a buffer and prompts for the buffer. PATCH-BUF is an optional argument, which specifies the buffer that contains the patch. If not given, the user is prompted according to the prefix argument.

Key Bindings

Aliases

epatch-buffer

Source Code

;; Defined in /usr/src/emacs/lisp/vc/ediff.el.gz
;;;###autoload
(defun ediff-patch-buffer (&optional arg patch-buf)
  "Run Ediff by patching the buffer specified at prompt.
Without the optional prefix ARG, asks if the patch is in some buffer and
prompts for the buffer or a file, depending on the answer.
With ARG=1, assumes the patch is in a file and prompts for the file.
With ARG=2, assumes the patch is in a buffer and prompts for the buffer.
PATCH-BUF is an optional argument, which specifies the buffer that contains the
patch.  If not given, the user is prompted according to the prefix argument."
  (interactive "P")
  (require 'ediff-ptch)
  (setq patch-buf
	(ediff-get-patch-buffer
	 (if arg (prefix-numeric-value arg)) patch-buf))
  (ediff-patch-buffer-internal
   patch-buf
   (read-buffer "Which buffer to patch? " (ediff-other-buffer patch-buf)
                'require-match)))