]> git.eshelyaron.com Git - emacs.git/commitdiff
(ediff-backup): New autoloaded command.
authorMarkus Rost <rost@math.uni-bielefeld.de>
Wed, 31 Jul 2002 22:29:36 +0000 (22:29 +0000)
committerMarkus Rost <rost@math.uni-bielefeld.de>
Wed, 31 Jul 2002 22:29:36 +0000 (22:29 +0000)
lisp/ChangeLog
lisp/ediff.el

index 553da0faa224f06c45ddffe5d057a5af0cee46f0..45f8b3682561050a94b01ca59a559e6dd018eb3a 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-31  Markus Rost  <rost@math.ohio-state.edu>
+
+       * help-fns.el (describe-function-1): Test function for
+       obsolescence only if it is a symbol.
+
+       * ediff.el (ediff-backup): New autoloaded command.
+
 2002-07-31  Richard M. Stallman  <rms@gnu.org>
 
        * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions):
index 2db82f855476d34592da354a4bbe0dabce7f4346..5b0f85d05cd22e75cbd16da91c2254b7ee5a27f7 100644 (file)
 ;;;###autoload
 (defalias 'ediff 'ediff-files)
 
+;;;###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)))
 
 ;;;###autoload
 (defun ediff-buffers (buffer-A buffer-B &optional startup-hooks job-name)