]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/ediff-mult.el
Dired recognize dirs when file size in human units
[gnu-emacs] / lisp / vc / ediff-mult.el
index cadcdec29b4f82c13b3bf8dcb79ad6b22c9f7fce..7f0db5d45dcd6a94e462dc03b7a7c002a328c4b3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff
 
-;; Copyright (C) 1995-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2016 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Package: ediff
   :prefix "ediff-"
   :group 'ediff)
 
-
-;; compiler pacifier
-(eval-when-compile
-  (require 'ediff-ptch)
-  (require 'ediff))
-;; end pacifier
-
 (require 'ediff-init)
+(require 'ediff-diff)
+(require 'ediff-wind)
+(require 'ediff-util)
+
 
 ;; meta-buffer
 (ediff-defvar-local ediff-meta-buffer nil "")
@@ -143,7 +140,7 @@ Useful commands (type ? to hide them and free up screen):
  uh/um:\tunmark all sessions marked for hiding/operation
  n,SPC:\tnext session
  p,DEL:\tprevious session
-     E:\tbrowse Ediff on-line manual
+     E:\tbrowse Ediff manual
      T:\ttoggle truncation of long file names
      q:\tquit this session group
 ")
@@ -177,7 +174,8 @@ directories.")
 (defcustom ediff-default-filtering-regexp nil
   "The default regular expression used as a filename filter in multifile comparisons.
 Should be a sexp.  For instance (car ediff-filtering-regexp-history) or nil."
-  :type 'sexp
+  :type 'sexp                           ; yuck - why not just a regexp?
+  :risky t
   :group 'ediff-mult)
 
 ;; This has the form ((meta-buf regexp dir1 dir2 dir3 merge-auto-store-dir)
@@ -217,8 +215,9 @@ This can be toggled with `ediff-toggle-filename-truncation'."
   :type 'hook
   :group 'ediff-mult)
 
-(defcustom ediff-before-session-group-setup-hooks nil
-  "Hooks to run before Ediff arranges the window for group-level operations.
+(defcustom ediff-before-session-group-setup-hooks
+  nil ;FIXME: Bad name (should be -hook or -functions) and never run??
+  "Hook run before Ediff arranges the window for group-level operations.
 It is used by commands such as `ediff-directories'.
 This hook can be used to save the previous window config, which can be restored
 on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'."
@@ -1117,7 +1116,7 @@ behavior."
     (setq overl
          (if (featurep 'xemacs)
              (map-extents
-              (lambda (ext maparg)
+              (lambda (ext _maparg)
                 (if (and
                      (ediff-overlay-get ext 'ediff-meta-info)
                      (eq (ediff-overlay-get ext 'ediff-meta-session-number)
@@ -1446,7 +1445,7 @@ Useful commands:
 
 
 ;; argument is ignored
-(defun ediff-redraw-registry-buffer (&optional ignore)
+(defun ediff-redraw-registry-buffer (&optional _ignore)
   (ediff-with-current-buffer ediff-registry-buffer
     (let ((point (point))
          elt bufAname bufBname bufCname cur-diff total-diffs pt
@@ -1458,7 +1457,8 @@ Useful commands:
          (map-extents 'delete-extent)
        (mapc 'delete-overlay (overlays-in 1 1)))
 
-      (insert "This is a registry of all active Ediff sessions.
+      (insert (substitute-command-keys "\
+This is a registry of all active Ediff sessions.
 
 Useful commands:
      button2, `v', RET over a session record:  switch to that session
@@ -1466,14 +1466,14 @@ Useful commands:
      R in any Ediff session:   display session registry
      n,SPC: next session
      p,DEL: previous session
-         E: browse Ediff on-line manual
+         E: browse Ediff manual
          q: bury registry
 
 
 \t\tActive Ediff Sessions:
 \t\t----------------------
 
-")
+"))
       ;; purge registry list from dead buffers
       (mapc (lambda (elt)
              (if (not (ediff-buffer-live-p elt))
@@ -1794,6 +1794,14 @@ all marked sessions must be active."
            ))
       (error "The patch buffer wasn't found"))))
 
+(declare-function ediff-directories-internal "ediff"
+                 (dir1 dir2 dir3 regexp action jobname
+                       &optional startup-hooks merge-autostore-dir))
+
+(declare-function ediff-directory-revisions-internal "ediff"
+                 (dir1 regexp action jobname
+                       &optional startup-hooks merge-autostore-dir))
+
 
 ;; This function executes in meta buffer.  It knows where event happened.
 (defun ediff-filegroup-action ()
@@ -2164,7 +2172,7 @@ all marked sessions must be active."
 ;; If meta-buf doesn't exist, it is created.  In that case, id doesn't have a
 ;; parent meta-buf
 ;; Check if META-BUF exists before calling this function
-;; Optional MUST-REDRAW, if non-nil, would force redrawal of the whole meta
+;; Optional MUST-REDRAW, if non-nil, would force redrawing of the whole meta
 ;; buffer.  Otherwise, it will just go over the buffer and update activity marks
 ;; and session status.
 ;; SESSION-NUMBER, if specified, says which session caused the update.
@@ -2359,6 +2367,8 @@ If this is a session registry buffer then just bury it."
            (setq point (point-min)))
        point))))
 
+(autoload 'ediff-patch-file-internal "ediff-ptch")
+
 ;; this is the action invoked when the user selects a patch from the meta
 ;; buffer.
 (defun ediff-patch-file-form-meta (file &optional startup-hooks)