* lisp/vc/ediff-diff.el, lisp/vc/ediff-merg.el: Require ediff-util at run-time.
* lisp/vc/ediff-mult.el: Adjust requires.
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-patch-file-internal): Declare.
* lisp/vc/ediff-ptch.el: Adjust requires.
(ediff-use-last-dir, ediff-buffers-internal): Declare.
(ediff-find-file): Autoload.
* lisp/vc/ediff-util.el: No need to load ediff when compiling.
(ediff-regions-internal): Declare.
* lisp/vc/ediff-wind.el: Adjust requires.
(ediff-compute-toolbar-width): Define when compiling.
(ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare.
* lisp/vc/ediff.el: No need to load dired, ediff-ptch when compiling.
(dired-get-filename, dired-get-marked-files)
(ediff-last-dir-patch, ediff-patch-default-directory)
(ediff-get-patch-buffer, ediff-dispatch-file-patching-job)
(ediff-patch-buffer-internal): Declare.
2013-05-23 Glenn Morris <rgm@gnu.org>
+ * vc/ediff-diff.el, vc/ediff-merg.el: Require ediff-util at run-time.
+ * vc/ediff-mult.el: Adjust requires.
+ (ediff-directories-internal, ediff-directory-revisions-internal)
+ (ediff-patch-file-internal): Declare.
+ * vc/ediff-ptch.el: Adjust requires.
+ (ediff-use-last-dir, ediff-buffers-internal): Declare.
+ (ediff-find-file): Autoload.
+ * vc/ediff-util.el: No need to load ediff when compiling.
+ (ediff-regions-internal): Declare.
+ * vc/ediff-wind.el: Adjust requires.
+ (ediff-compute-toolbar-width): Define when compiling.
+ (ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare.
+ * vc/ediff.el: No need to load dired, ediff-ptch when compiling.
+ (dired-get-filename, dired-get-marked-files)
+ (ediff-last-dir-patch, ediff-patch-default-directory)
+ (ediff-get-patch-buffer, ediff-dispatch-file-patching-job)
+ (ediff-patch-buffer-internal): Declare.
+
* emacs-lisp/checkdoc.el: No need to load ispell when compiling.
(ispell-process, ispell-buffer-local-words, lm-summary)
(lm-section-start, lm-section-end): Declare.
(provide 'ediff-diff)
-(eval-when-compile
- (require 'ediff-util))
-
(require 'ediff-init)
+(require 'ediff-util)
(defgroup ediff-diff nil
"Diff related utilities."
(defvar ediff-merge-window-share)
(defvar ediff-window-config-saved)
-(eval-when-compile
- (require 'ediff-util))
-;; end pacifier
-
(require 'ediff-init)
+(require 'ediff-util)
(defcustom ediff-quit-merge-hook 'ediff-maybe-save-and-delete-merge
"Hooks to run before quitting a merge job.
: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 "")
))
(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 ()
(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)
:prefix "ediff-"
:group 'ediff)
-;; compiler pacifier
-(eval-when-compile
- (require 'ediff))
-;; end pacifier
-
(require 'ediff-init)
+(require 'ediff-util)
(defcustom ediff-patch-program "patch"
"Name of the program that applies patches.
(set-window-buffer ediff-window-B ediff-patch-diagnostics))
(t (display-buffer ediff-patch-diagnostics 'not-this-window))))
+(defvar ediff-use-last-dir)
+
;; prompt for file, get the buffer
(defun ediff-prompt-for-patch-file ()
(let ((dir (cond (ediff-use-last-dir ediff-last-dir-patch)
;;; (eq code 0)
;;; (not (eq code 2))))
+(autoload 'ediff-find-file "ediff")
+(declare-function ediff-buffers-internal "ediff"
+ (buf-a buf-b buf-c startup-hooks job-name
+ &optional merge-buffer-file))
+
(defun ediff-patch-file-internal (patch-buf source-filename
&optional startup-hooks)
(setq source-filename (expand-file-name source-filename))
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-(eval-when-compile
- (require 'ediff))
-
;; end pacifier
(if (window-live-p ediff-control-window)
(select-window ediff-control-window)))
+(declare-function ediff-regions-internal "ediff"
+ (buffer-a beg-a end-a buffer-b beg-b end-b
+ startup-hooks job-name word-mode setup-parameters))
(defun ediff-inferior-compare-regions ()
"Compare regions in an active Ediff session.
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-(eval-when-compile
- (require 'ediff-util)
- (require 'ediff-help))
+(require 'ediff-init)
+(require 'ediff-help)
;; end pacifier
-(require 'ediff-init)
;; be careful with ediff-tbar
-(if (featurep 'xemacs)
- (require 'ediff-tbar)
- (defun ediff-compute-toolbar-width () 0))
+(eval-and-compile
+ (if (featurep 'xemacs)
+ (require 'ediff-tbar)
+ (defun ediff-compute-toolbar-width () 0)))
(defgroup ediff-window nil
"Ediff window manipulation."
(ediff-setup-windows-plain-compare
buffer-A buffer-B buffer-C control-buffer)))
+(autoload 'ediff-setup-control-buffer "ediff-util")
+
(defun ediff-setup-windows-plain-merge (buf-A buf-B buf-C control-buffer)
;; skip dedicated and unsplittable frames
(ediff-destroy-control-frame control-buffer)
(not (ediff-frame-has-dedicated-windows (window-frame wind)))
)))
+(declare-function ediff-make-bottom-toolbar "ediff-util" (&optional frame))
+
;; Prepare or refresh control frame
(defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame)
(let ((window-min-height 1)
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
-(eval-when-compile
- (require 'dired)
- (require 'ediff-util)
- (require 'ediff-ptch))
+(require 'ediff-util)
;; end pacifier
(require 'ediff-init)
(ediff-with-current-buffer ediff-buffer-A
(setq buffer-read-only t)))
+(declare-function dired-get-filename "dired"
+ (&optional localp no-error-if-not-filep))
+(declare-function dired-get-marked-files "dired"
+ (&optional localp arg filter distinguish-one-marked))
+
;; Return a plausible default for ediff's first file:
;; In dired, return the file number FILENO (or 0) in the list
;; (all-selected-files, filename under the cursor), where directories are
rev1 rev2 ancestor-rev startup-hooks merge-buffer-file)))
;;; Apply patch
+(defvar ediff-last-dir-patch)
+(defvar ediff-patch-default-directory)
+(declare-function ediff-get-patch-buffer "ediff-ptch"
+ (&optional arg patch-buf))
+(declare-function ediff-dispatch-file-patching-job "ediff-ptch"
+ (patch-buf filename &optional startup-hooks))
;;;###autoload
(defun ediff-patch-file (&optional arg patch-buf)
source-dir nil nil (ediff-get-default-file-name)))
(ediff-dispatch-file-patching-job patch-buf source-file)))
+(declare-function ediff-patch-buffer-internal "ediff-ptch"
+ (patch-buf buf-to-patch-name &optional startup-hooks))
+
;;;###autoload
(defun ediff-patch-buffer (&optional arg patch-buf)
"Run Ediff by patching the buffer specified at prompt.