;;; 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.
Commands:
\\{ediff-mode-map}"
+ ;; FIXME: Use define-derived-mode.
(kill-all-local-variables)
(setq major-mode 'ediff-mode)
(setq mode-name "Ediff")
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))
(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
;; 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
(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)
........................
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.
;; 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)))
;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;; End:
-;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879
;;; ediff-util.el ends here