]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/ediff-util.el
Spelling fixes.
[gnu-emacs] / lisp / vc / ediff-util.el
index 77284a19f5099815b255041b8fa0af9dfb6f8eb6..b1c6e367ef7b2519b42788db05e3ed0cc1684c58 100644 (file)
@@ -1,9 +1,9 @@
 ;;; 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 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2011  Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
+;; Package: ediff
 
 ;; This file is part of GNU Emacs.
 
@@ -92,6 +92,7 @@ This mode is entered through one of the following commands:
 
 Commands:
 \\{ediff-mode-map}"
+  ;; FIXME: Use define-derived-mode.
   (kill-all-local-variables)
   (setq major-mode 'ediff-mode)
   (setq mode-name "Ediff")
@@ -309,7 +310,7 @@ to invocation.")
            ediff-word-mode-job (ediff-word-mode-job))
 
       ;; Don't delete variants in case of ediff-buffer-* jobs without asking.
-      ;; This is because one may loose work---dangerous.
+      ;; This is because one may lose work---dangerous.
       (if (string-match "buffer" (symbol-name ediff-job-name))
          (setq ediff-keep-variants t))
 
@@ -451,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))
@@ -1681,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)
@@ -2634,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
@@ -3810,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
@@ -3840,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)
@@ -3993,7 +3994,7 @@ byte-compilation may produce output like this:
           ........................
        While compiling the end of the data:
         ** The following functions are not known to be defined:
-          ediff-valid-color-p, ediff-set-face,
+          xxx, yyy
           ........................
 
 These are NOT errors, but inevitable warnings, which ought to be ignored.
@@ -4143,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)))
@@ -4287,5 +4282,4 @@ Mail anyway? (y or n) ")
 ;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
 ;; End:
 
-;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879
 ;;; ediff-util.el ends here