Commit a5c7df1a authored by Glenn Morris's avatar Glenn Morris
Browse files

Silence ediff compilation

* 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.
parent c7641e3c
2013-05-23 Glenn Morris <rgm@gnu.org> 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. * emacs-lisp/checkdoc.el: No need to load ispell when compiling.
(ispell-process, ispell-buffer-local-words, lm-summary) (ispell-process, ispell-buffer-local-words, lm-summary)
(lm-section-start, lm-section-end): Declare. (lm-section-start, lm-section-end): Declare.
......
...@@ -27,10 +27,8 @@ ...@@ -27,10 +27,8 @@
(provide 'ediff-diff) (provide 'ediff-diff)
(eval-when-compile
(require 'ediff-util))
(require 'ediff-init) (require 'ediff-init)
(require 'ediff-util)
(defgroup ediff-diff nil (defgroup ediff-diff nil
"Diff related utilities." "Diff related utilities."
......
...@@ -32,11 +32,8 @@ ...@@ -32,11 +32,8 @@
(defvar ediff-merge-window-share) (defvar ediff-merge-window-share)
(defvar ediff-window-config-saved) (defvar ediff-window-config-saved)
(eval-when-compile
(require 'ediff-util))
;; end pacifier
(require 'ediff-init) (require 'ediff-init)
(require 'ediff-util)
(defcustom ediff-quit-merge-hook 'ediff-maybe-save-and-delete-merge (defcustom ediff-quit-merge-hook 'ediff-maybe-save-and-delete-merge
"Hooks to run before quitting a merge job. "Hooks to run before quitting a merge job.
......
...@@ -110,14 +110,11 @@ ...@@ -110,14 +110,11 @@
:prefix "ediff-" :prefix "ediff-"
:group 'ediff) :group 'ediff)
;; compiler pacifier
(eval-when-compile
(require 'ediff-ptch)
(require 'ediff))
;; end pacifier
(require 'ediff-init) (require 'ediff-init)
(require 'ediff-diff)
(require 'ediff-wind)
(require 'ediff-util)
;; meta-buffer ;; meta-buffer
(ediff-defvar-local ediff-meta-buffer nil "") (ediff-defvar-local ediff-meta-buffer nil "")
...@@ -1795,6 +1792,14 @@ all marked sessions must be active." ...@@ -1795,6 +1792,14 @@ all marked sessions must be active."
)) ))
(error "The patch buffer wasn't found")))) (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. ;; This function executes in meta buffer. It knows where event happened.
(defun ediff-filegroup-action () (defun ediff-filegroup-action ()
...@@ -2360,6 +2365,8 @@ If this is a session registry buffer then just bury it." ...@@ -2360,6 +2365,8 @@ If this is a session registry buffer then just bury it."
(setq point (point-min))) (setq point (point-min)))
point)))) point))))
(autoload 'ediff-patch-file-internal "ediff-ptch")
;; this is the action invoked when the user selects a patch from the meta ;; this is the action invoked when the user selects a patch from the meta
;; buffer. ;; buffer.
(defun ediff-patch-file-form-meta (file &optional startup-hooks) (defun ediff-patch-file-form-meta (file &optional startup-hooks)
......
...@@ -33,12 +33,8 @@ ...@@ -33,12 +33,8 @@
:prefix "ediff-" :prefix "ediff-"
:group 'ediff) :group 'ediff)
;; compiler pacifier
(eval-when-compile
(require 'ediff))
;; end pacifier
(require 'ediff-init) (require 'ediff-init)
(require 'ediff-util)
(defcustom ediff-patch-program "patch" (defcustom ediff-patch-program "patch"
"Name of the program that applies patches. "Name of the program that applies patches.
...@@ -472,6 +468,8 @@ are two possible targets for this patch. However, these files do not exist." ...@@ -472,6 +468,8 @@ are two possible targets for this patch. However, these files do not exist."
(set-window-buffer ediff-window-B ediff-patch-diagnostics)) (set-window-buffer ediff-window-B ediff-patch-diagnostics))
(t (display-buffer ediff-patch-diagnostics 'not-this-window)))) (t (display-buffer ediff-patch-diagnostics 'not-this-window))))
(defvar ediff-use-last-dir)
;; prompt for file, get the buffer ;; prompt for file, get the buffer
(defun ediff-prompt-for-patch-file () (defun ediff-prompt-for-patch-file ()
(let ((dir (cond (ediff-use-last-dir ediff-last-dir-patch) (let ((dir (cond (ediff-use-last-dir ediff-last-dir-patch)
...@@ -642,6 +640,11 @@ optional argument, then use it." ...@@ -642,6 +640,11 @@ optional argument, then use it."
;;; (eq code 0) ;;; (eq code 0)
;;; (not (eq code 2)))) ;;; (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 (defun ediff-patch-file-internal (patch-buf source-filename
&optional startup-hooks) &optional startup-hooks)
(setq source-filename (expand-file-name source-filename)) (setq source-filename (expand-file-name source-filename))
......
...@@ -42,9 +42,6 @@ ...@@ -42,9 +42,6 @@
(eval-and-compile (eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'ediff))
;; end pacifier ;; end pacifier
...@@ -3477,6 +3474,9 @@ Without an argument, it saves customized diff argument, if available ...@@ -3477,6 +3474,9 @@ Without an argument, it saves customized diff argument, if available
(if (window-live-p ediff-control-window) (if (window-live-p ediff-control-window)
(select-window 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 () (defun ediff-inferior-compare-regions ()
"Compare regions in an active Ediff session. "Compare regions in an active Ediff session.
......
...@@ -42,17 +42,16 @@ ...@@ -42,17 +42,16 @@
(eval-and-compile (eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'ediff-init)
(require 'ediff-util) (require 'ediff-help)
(require 'ediff-help))
;; end pacifier ;; end pacifier
(require 'ediff-init)
;; be careful with ediff-tbar ;; be careful with ediff-tbar
(if (featurep 'xemacs) (eval-and-compile
(if (featurep 'xemacs)
(require 'ediff-tbar) (require 'ediff-tbar)
(defun ediff-compute-toolbar-width () 0)) (defun ediff-compute-toolbar-width () 0)))
(defgroup ediff-window nil (defgroup ediff-window nil
"Ediff window manipulation." "Ediff window manipulation."
...@@ -358,6 +357,8 @@ into icons, regardless of the window manager." ...@@ -358,6 +357,8 @@ into icons, regardless of the window manager."
(ediff-setup-windows-plain-compare (ediff-setup-windows-plain-compare
buffer-A buffer-B buffer-C control-buffer))) 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) (defun ediff-setup-windows-plain-merge (buf-A buf-B buf-C control-buffer)
;; skip dedicated and unsplittable frames ;; skip dedicated and unsplittable frames
(ediff-destroy-control-frame control-buffer) (ediff-destroy-control-frame control-buffer)
...@@ -908,6 +909,8 @@ into icons, regardless of the window manager." ...@@ -908,6 +909,8 @@ into icons, regardless of the window manager."
(not (ediff-frame-has-dedicated-windows (window-frame wind))) (not (ediff-frame-has-dedicated-windows (window-frame wind)))
))) )))
(declare-function ediff-make-bottom-toolbar "ediff-util" (&optional frame))
;; Prepare or refresh control frame ;; Prepare or refresh control frame
(defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame) (defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame)
(let ((window-min-height 1) (let ((window-min-height 1)
......
...@@ -116,11 +116,7 @@ ...@@ -116,11 +116,7 @@
(eval-and-compile (eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(require 'ediff-util)
(eval-when-compile
(require 'dired)
(require 'ediff-util)
(require 'ediff-ptch))
;; end pacifier ;; end pacifier
(require 'ediff-init) (require 'ediff-init)
...@@ -154,6 +150,11 @@ ...@@ -154,6 +150,11 @@
(ediff-with-current-buffer ediff-buffer-A (ediff-with-current-buffer ediff-buffer-A
(setq buffer-read-only t))) (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: ;; Return a plausible default for ediff's first file:
;; In dired, return the file number FILENO (or 0) in the list ;; In dired, return the file number FILENO (or 0) in the list
;; (all-selected-files, filename under the cursor), where directories are ;; (all-selected-files, filename under the cursor), where directories are
...@@ -1345,6 +1346,12 @@ buffer." ...@@ -1345,6 +1346,12 @@ buffer."
rev1 rev2 ancestor-rev startup-hooks merge-buffer-file))) rev1 rev2 ancestor-rev startup-hooks merge-buffer-file)))
;;; Apply patch ;;; 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 ;;;###autoload
(defun ediff-patch-file (&optional arg patch-buf) (defun ediff-patch-file (&optional arg patch-buf)
...@@ -1373,6 +1380,9 @@ buffer. If odd -- assume it is in a file." ...@@ -1373,6 +1380,9 @@ buffer. If odd -- assume it is in a file."
source-dir nil nil (ediff-get-default-file-name))) source-dir nil nil (ediff-get-default-file-name)))
(ediff-dispatch-file-patching-job patch-buf source-file))) (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 ;;;###autoload
(defun ediff-patch-buffer (&optional arg patch-buf) (defun ediff-patch-buffer (&optional arg patch-buf)
"Run Ediff by patching the buffer specified at prompt. "Run Ediff by patching the buffer specified at prompt.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment