]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/ediff-util.el
Spelling fixes.
[gnu-emacs] / lisp / vc / ediff-util.el
index 5d2e07b33f1a480d8419c1eb207f1adc23fc1bf2..b1c6e367ef7b2519b42788db05e3ed0cc1684c58 100644 (file)
@@ -1,8 +1,6 @@
 ;;; ediff-util.el --- the core commands and utilities of ediff
 
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1994-2011  Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Package: ediff
@@ -454,7 +452,7 @@ to invocation.")
       (if ediff-3way-job
          (ediff-with-current-buffer ediff-buffer-C
            (ediff-nuke-selective-display)
-           ;; the merge bufer should never be narrowed
+           ;; the merge buffer should never be narrowed
            ;; (it can happen if it is on rmail-mode or similar)
            (if (ediff-with-current-buffer control-buffer ediff-merge-job)
                (widen))
@@ -1684,7 +1682,7 @@ the width of the A/B/C windows."
                            'ediff-get-lines-to-region-start)
                           ((eq op 'scroll-up)
                            'ediff-get-lines-to-region-end)
-                          (t '(lambda (a b c) 0))))
+                          (t (lambda (a b c) 0))))
               (max-lines (max (funcall func 'A n ctl-buf)
                               (funcall func 'B n ctl-buf)
                               (if (ediff-buffer-live-p ediff-buffer-C)
@@ -2637,7 +2635,7 @@ delete this buffer in another session as well."
     ))
 
 ;; Kill the variant buffer, according to user directives (ask, kill
-;; unconditionaly, keep)
+;; unconditionally, keep)
 ;; BUFF is the buffer, BUFF-TYPE is either 'A, or 'B, 'C, 'Ancestor
 (defun ediff-dispose-of-variant-according-to-user (buff bufftype ask keep-variants)
   ;; if this is indirect buffer, kill it and substitute with direct buf
@@ -3813,7 +3811,7 @@ Ediff Control Panel to restore highlighting."
         ;; later, and nconc above will break it. Either this or use slow
         ;; append instead of nconc
         (selected-buffers (ediff-get-selected-buffers))
-        (prefered-buffer (car all-buffers))
+        (preferred-buffer (car all-buffers))
         visible-dired-buffers
         (excl-buff-name-list
          (mapcar
@@ -3843,7 +3841,7 @@ Ediff Control Panel to restore highlighting."
             (cond ((member (buffer-name x) excl-buff-name-list) nil)
                   ((memq x selected-buffers) x)
                   ((not (ediff-get-visible-buffer-window x)) nil)
-                  ((eq x prefered-buffer) x)
+                  ((eq x preferred-buffer) x)
                   ;; if prev selected buffer is dired, look only at
                   ;; dired.
                   ((eq use-dired-major-mode 'yes)
@@ -4146,15 +4144,9 @@ Mail anyway? (y or n) ")
 
 ;; calculate time used by command
 (defun ediff-calc-command-time ()
-  (let ((end (current-time))
-       micro sec)
-    (setq micro
-         (if (>= (nth 2 end) (nth 2 ediff-command-begin-time))
-             (- (nth 2 end) (nth 2 ediff-command-begin-time))
-           (+ (nth 2 end) (- 1000000 (nth 2 ediff-command-begin-time)))))
-    (setq sec (- (nth 1 end) (nth 1 ediff-command-begin-time)))
-    (or (equal ediff-command-begin-time '(0 0 0))
-       (message "Elapsed time: %d second(s) + %d microsecond(s)" sec micro))))
+  (or (equal ediff-command-begin-time '(0 0 0))
+      (message "Elapsed time: %g second(s)"
+              (float-time (time-since ediff-command-begin-time)))))
 
 (defsubst ediff-save-time ()
   (setq ediff-command-begin-time (current-time)))