;;; 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
(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))
'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)
))
;; 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
;; 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)))