Function: ediff-backup
ediff-backup is an autoloaded, interactive and byte-compiled function
defined in ediff.el.gz.
Signature
(ediff-backup FILE)
Documentation
Run Ediff on FILE and its backup file.
Uses the latest backup, if there are several numerical backups.
If this file is a backup, ediff it with its original.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/ediff.el.gz
;;;###autoload
(defun ediff-backup (file)
"Run Ediff on FILE and its backup file.
Uses the latest backup, if there are several numerical backups.
If this file is a backup, `ediff' it with its original."
(interactive (list (read-file-name "Ediff (file with backup): ")))
;; The code is taken from `diff-backup'.
(require 'diff)
(let (bak ori)
(if (backup-file-name-p file)
(setq bak file
ori (file-name-sans-versions file))
(setq bak (or (diff-latest-backup-file file)
(error "No backup found for %s" file))
ori file))
(ediff-files bak ori)))