diff options
| author | Markus Rost | 2002-07-31 22:29:36 +0000 |
|---|---|---|
| committer | Markus Rost | 2002-07-31 22:29:36 +0000 |
| commit | 3755bd32c9022973de835c42ffdadde1beb32f3a (patch) | |
| tree | 350c209298e30da1bb5f070d782b0a48f92adf81 | |
| parent | 32d9a725a59ca66fa15d0491defdc4c37dd1b46b (diff) | |
| download | emacs-3755bd32c9022973de835c42ffdadde1beb32f3a.tar.gz emacs-3755bd32c9022973de835c42ffdadde1beb32f3a.zip | |
(ediff-backup): New autoloaded command.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/ediff.el | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 553da0faa22..45f8b368256 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2002-07-31 Markus Rost <rost@math.ohio-state.edu> | ||
| 2 | |||
| 3 | * help-fns.el (describe-function-1): Test function for | ||
| 4 | obsolescence only if it is a symbol. | ||
| 5 | |||
| 6 | * ediff.el (ediff-backup): New autoloaded command. | ||
| 7 | |||
| 1 | 2002-07-31 Richard M. Stallman <rms@gnu.org> | 8 | 2002-07-31 Richard M. Stallman <rms@gnu.org> |
| 2 | 9 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): | 10 | * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): |
diff --git a/lisp/ediff.el b/lisp/ediff.el index 2db82f85547..5b0f85d05cd 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -367,6 +367,22 @@ | |||
| 367 | ;;;###autoload | 367 | ;;;###autoload |
| 368 | (defalias 'ediff 'ediff-files) | 368 | (defalias 'ediff 'ediff-files) |
| 369 | 369 | ||
| 370 | ;;;###autoload | ||
| 371 | (defun ediff-backup (file) | ||
| 372 | "Run Ediff on FILE and its backup file. | ||
| 373 | Uses the latest backup, if there are several numerical backups. | ||
| 374 | If this file is a backup, `ediff' it with its original." | ||
| 375 | (interactive (list (read-file-name "Ediff (file with backup): "))) | ||
| 376 | ;; The code is taken from `diff-backup'. | ||
| 377 | (require 'diff) | ||
| 378 | (let (bak ori) | ||
| 379 | (if (backup-file-name-p file) | ||
| 380 | (setq bak file | ||
| 381 | ori (file-name-sans-versions file)) | ||
| 382 | (setq bak (or (diff-latest-backup-file file) | ||
| 383 | (error "No backup found for %s" file)) | ||
| 384 | ori file)) | ||
| 385 | (ediff-files bak ori))) | ||
| 370 | 386 | ||
| 371 | ;;;###autoload | 387 | ;;;###autoload |
| 372 | (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name) | 388 | (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name) |